fix position of sidebar image when using custom windowbar

This commit is contained in:
jeffvli 2025-09-05 01:17:00 -07:00
parent e1e0670350
commit 229f9e984e
2 changed files with 6 additions and 2 deletions

View file

@ -27,7 +27,8 @@
} }
.image-container { .image-container {
position: relative; position: absolute;
bottom: 0;
width: var(--sidebar-image-height); width: var(--sidebar-image-height);
height: var(--sidebar-image-height); height: var(--sidebar-image-height);
cursor: pointer; cursor: pointer;

View file

@ -90,7 +90,8 @@ export const Sidebar = () => {
const scrollAreaHeight = useMemo(() => { const scrollAreaHeight = useMemo(() => {
if (showImage) { if (showImage) {
if (windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS) { if (windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS) {
return `calc(100% - 105px - ${sidebar.leftWidth})`; // Subtract the height of the top bar and padding
return `calc(100% - 65px - var(--mantine-spacing-xs) - ${sidebar.leftWidth})`;
} }
return `calc(100% - ${sidebar.leftWidth})`; return `calc(100% - ${sidebar.leftWidth})`;
@ -99,6 +100,8 @@ export const Sidebar = () => {
return '100%'; return '100%';
}, [showImage, sidebar.leftWidth, windowBarStyle]); }, [showImage, sidebar.leftWidth, windowBarStyle]);
console.log('scrollAreaHeight', scrollAreaHeight);
const isCustomWindowBar = const isCustomWindowBar =
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS; windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;