use consistent height calculation for sidebar scrollarea

This commit is contained in:
jeffvli 2025-09-06 18:34:13 -07:00
parent cd0a8d0fec
commit 854222d2fa

View file

@ -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;