Skip to content

Commit 98958ae

Browse files
authored
Apply active FreeTube theme to shaka-player menus (#5986)
* Apply active FreeTube theme to shaka-player menus * Add primary color override for range containers with the Hot Pink theme
1 parent fdd0f61 commit 98958ae

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,31 @@
4343
flex-direction: column-reverse;
4444
}
4545

46+
/*
47+
Apply the active FreeTube base theme to shaka-player's menus.
48+
Usually we go for classes and not element names,
49+
however as we need to override shaka-player's CSS
50+
we need to use the same selectors that they do.
51+
*/
52+
53+
:deep(.shaka-overflow-menu),
54+
:deep(.shaka-settings-menu) {
55+
background: var(--card-bg-color) !important;
56+
}
57+
58+
:deep(.shaka-overflow-menu button),
59+
:deep(.shaka-settings-menu button) {
60+
color: var(--primary-text-color) !important;
61+
}
62+
63+
:deep(.shaka-overflow-menu button:hover),
64+
:deep(.shaka-settings-menu button:hover) {
65+
background: var(--side-nav-hover-color) !important;
66+
color: var(--side-nav-hover-text-color) !important;
67+
}
68+
69+
/* End of theming code */
70+
4671
.sixteenByNine {
4772
aspect-ratio: 16 / 9;
4873
}

src/renderer/themes.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ it can be safely elided. This looks quite pleasant on this theme. */
7373
text-decoration: underline;
7474
}
7575

76+
.hotPink .shaka-range-container {
77+
--primary-color: #fff;
78+
}
79+
7680

7781
/*************** DARK THEME ADJUSTMENTS ***************/
7882

0 commit comments

Comments
 (0)