Skip to content

Commit 4557aff

Browse files
committed
fix(renderer): fix macos traffic lights gap
- resolve #2035
1 parent 3a42d70 commit 4557aff

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/plugins/in-app-menu/titlebar.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
}
55

66
/* youtube-music style */
7-
87
ytmusic-app-layout {
98
overflow: scroll;
109
height: calc(100vh - var(--menu-bar-height, 36px));
1110
margin-top: var(--menu-bar-height, 36px) !important;
1211
}
12+
ytmusic-app-layout#layout {
13+
--ytmusic-nav-bar-offset: 0px;
14+
}
1315

1416
ytmusic-app-layout::-webkit-scrollbar{
1517
width: var(--ytmusic-scrollbar-width);

src/renderer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ const preload = async () => {
225225
t: i18t.bind(i18next),
226226
};
227227
defineYTMDTransElements();
228+
document.body.dataset.os = navigator.userAgent;
228229
};
229230

230231
const main = async () => {

src/youtube-music.css

+9
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,12 @@ tp-yt-paper-item.ytmusic-guide-entry-renderer::before {
8080
ytmusic-player[player-ui-state=FULLSCREEN] {
8181
margin-top: calc(var(--menu-bar-height, 32px) * -1) !important;
8282
}
83+
84+
/* macos traffic lights fix */
85+
:where([data-os*="Macintosh"]) ytmusic-app-layout#layout ytmusic-nav-bar {
86+
padding-top: var(--ytmusic-nav-bar-offset, 0);
87+
}
88+
:where([data-os*="Macintosh"]) ytmusic-app-layout#layout {
89+
--ytmusic-nav-bar-offset: 24px;
90+
--ytmusic-nav-bar-height: calc(90px + var(--ytmusic-nav-bar-offset, 0));
91+
}

0 commit comments

Comments
 (0)