mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
fix position of sidebar image when using custom windowbar
This commit is contained in:
parent
e1e0670350
commit
229f9e984e
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue