mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 21:50:35 +02:00
use consistent height calculation for sidebar scrollarea
This commit is contained in:
@@ -89,16 +89,12 @@ export const Sidebar = () => {
|
|||||||
|
|
||||||
const scrollAreaHeight = useMemo(() => {
|
const scrollAreaHeight = useMemo(() => {
|
||||||
if (showImage) {
|
if (showImage) {
|
||||||
if (windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS) {
|
// Subtract the height of the top bar and padding
|
||||||
// Subtract the height of the top bar and padding
|
return `calc(100% - 65px - var(--mantine-spacing-xs) - ${sidebar.leftWidth})`;
|
||||||
return `calc(100% - 65px - var(--mantine-spacing-xs) - ${sidebar.leftWidth})`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return `calc(100% - ${sidebar.leftWidth})`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return '100%';
|
return '100%';
|
||||||
}, [showImage, sidebar.leftWidth, windowBarStyle]);
|
}, [showImage, sidebar.leftWidth]);
|
||||||
|
|
||||||
const isCustomWindowBar =
|
const isCustomWindowBar =
|
||||||
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;
|
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;
|
||||||
|
|||||||
Reference in New Issue
Block a user