Skip to content

Commit f9c3a71

Browse files
pswp css fixed on electron mode.
1 parent 3d26f16 commit f9c3a71

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

src/app/templates/client/ElectronSidebar.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function ElectronSidebar() {
3939

4040
const newSize = $(window).height() - 29;
4141
if (rootSize)
42-
$(rootSize).html(`.root-electron-style { height: ${String(newSize)}px !important; }`);
42+
$(rootSize).html(
43+
`.root-electron-style, .pswp.pswp--open .pswp__bg { height: ${String(newSize)}px !important; }`,
44+
);
4345
};
4446

4547
useEffect(() => {

src/scss/electron/ElectronSidebar.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ body.electron-mode {
6969
padding-top: 29px !important;
7070
}
7171

72+
.pswp.pswp--open {
73+
.pswp__bg {
74+
margin-top: 29px !important;
75+
}
76+
.pswp__container,
77+
.pswp__top-bar {
78+
padding-top: 29px;
79+
}
80+
}
81+
7282
.root-electron-style {
7383
position: relative !important;
7484
top: 29px !important;

src/scss/electron/border-radius.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ body.electron-mode:not(.electron-maximized) {
6363
border-radius: var(--electron-body-radius) !important;
6464
}
6565

66+
.pswp.pswp--open {
67+
.pswp__bg {
68+
border-bottom-right-radius: var(--electron-body-radius) !important;
69+
border-bottom-left-radius: var(--electron-body-radius) !important;
70+
}
71+
}
72+
6673
--electron-body-border: 1px solid var(--bg-electron-border);
6774
#root {
6875
> *:not(#electron-titlebar) {
@@ -84,4 +91,11 @@ body.electron-mode:not(.electron-maximized) {
8491
border-right: var(--electron-body-border) !important;
8592
border-bottom: var(--electron-body-border) !important;
8693
}
94+
.pswp.pswp--open {
95+
.pswp__bg {
96+
border-left: var(--electron-body-border) !important;
97+
border-right: var(--electron-body-border) !important;
98+
border-bottom: var(--electron-body-border) !important;
99+
}
100+
}
87101
}

0 commit comments

Comments
 (0)