mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
use consistent height calculation for sidebar scrollarea
This commit is contained in:
parent
cd0a8d0fec
commit
854222d2fa
1 changed files with 3 additions and 7 deletions
|
|
@ -89,16 +89,12 @@ export const Sidebar = () => {
|
|||
|
||||
const scrollAreaHeight = useMemo(() => {
|
||||
if (showImage) {
|
||||
if (windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS) {
|
||||
// Subtract the height of the top bar and padding
|
||||
return `calc(100% - 65px - var(--mantine-spacing-xs) - ${sidebar.leftWidth})`;
|
||||
}
|
||||
|
||||
return `calc(100% - ${sidebar.leftWidth})`;
|
||||
// Subtract the height of the top bar and padding
|
||||
return `calc(100% - 65px - var(--mantine-spacing-xs) - ${sidebar.leftWidth})`;
|
||||
}
|
||||
|
||||
return '100%';
|
||||
}, [showImage, sidebar.leftWidth, windowBarStyle]);
|
||||
}, [showImage, sidebar.leftWidth]);
|
||||
|
||||
const isCustomWindowBar =
|
||||
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue