Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/gui/src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pre {
--primary-lightness: 93.33%;
--primary-alpha: 0.8;
--primary-color: #373e44;
--primary-color-sidebar: #fefeff;
--primary-color-sidebar-item: #5a5d61aa;

--window-head-hue: var(--primary-hue);
--window-head-saturation: var(--primary-saturation);
Expand All @@ -101,6 +103,9 @@ pre {
--window-sidebar-lightness: var(--primary-lightness);
--window-sidebar-alpha: calc(min(1, 0.11 + var(--primary-alpha)));
--window-sidebar-color: var(--primary-color);
--window-sidebar-active-bg: var(--primary-color-sidebar-item);
--window-action-btn-filter: none;


--taskbar-hue: var(--primary-hue);
--taskbar-saturation: var(--primary-saturation);
Expand Down Expand Up @@ -1218,7 +1223,7 @@ span.header-sort-icon img {
margin: 0;
font-weight: bold;
font-size: 13px;
color: #8f96a3;
color: var(--window-sidebar-color);
text-shadow: 1px 1px rgb(247 247 247 / 15%);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand All @@ -1243,7 +1248,7 @@ span.header-sort-icon img {
margin-top: 2px;
padding: 4px;
border-radius: 3px;
color: #444444;
color: var(--window-sidebar-color);
font-size: 13px;
cursor: pointer;
transition: 0.15s background-color;
Expand All @@ -1255,7 +1260,7 @@ span.header-sort-icon img {
}

.window-sidebar-item-active, .window-sidebar-item-drag-active, .window-sidebar-item-active:hover {
background-color: #fefeff;
background-color: var(--window-sidebar-active-bg);
}

.window-sidebar-item-placeholder {
Expand Down Expand Up @@ -1398,6 +1403,7 @@ span.header-sort-icon img {
margin-right: 4px;
margin-left: 4px;
opacity: 0.5;
filter: var(--window-action-btn-filter);
-webkit-user-drag: none;
user-select: none;
-moz-user-select: none;
Expand All @@ -1412,7 +1418,8 @@ span.header-sort-icon img {
.window-scale-btn>img {
width: 15px;
height: 15px;
margin-top: 7px
margin-top: 7px;
filter: var(--window-action-btn-filter);
}

.window-app-iframe {
Expand Down
5 changes: 5 additions & 0 deletions src/gui/src/services/ThemeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export class ThemeService extends Service {
...data.colors,
};
this.reload_();
} else {
// Initialize CSS variables with default values
this.reload_();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we can remove the else condition and move line 89 below to always run this.reload()

}
}

Expand Down Expand Up @@ -121,6 +124,8 @@ export class ThemeService extends Service {
this.root.style.setProperty('--primary-lightness', s.lig + '%');
this.root.style.setProperty('--primary-alpha', s.alpha);
this.root.style.setProperty('--primary-color', s.light_text ? 'white' : '#373e44');
this.root.style.setProperty('--primary-color-sidebar-item', s.light_text ? '#5a5d61aa' : '#fefeff');
this.root.style.setProperty('--window-action-btn-filter', s.light_text ? 'invert(1) brightness(2)' : 'none');

// TODO: Should we debounce this to reduce traffic?
this.#broadcastService.sendBroadcast('themeChanged', {
Expand Down