mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +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 {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: var(--sidebar-image-height);
|
||||
height: var(--sidebar-image-height);
|
||||
cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,8 @@ export const Sidebar = () => {
|
|||
const scrollAreaHeight = useMemo(() => {
|
||||
if (showImage) {
|
||||
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})`;
|
||||
|
|
@ -99,6 +100,8 @@ export const Sidebar = () => {
|
|||
return '100%';
|
||||
}, [showImage, sidebar.leftWidth, windowBarStyle]);
|
||||
|
||||
console.log('scrollAreaHeight', scrollAreaHeight);
|
||||
|
||||
const isCustomWindowBar =
|
||||
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue