mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +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(() => {
|
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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue