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
5 changes: 3 additions & 2 deletions src/gui/src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pre {
--select-saturation: 74.22%;
--select-lightness: 55.88%;
--select-color: hsl(var(--select-hue), var(--select-saturation), var(--select-lightness));
--sidebar-header-text-color: hsl(210, 41.18%, 90%); /* Default to light color */
}

html, body {
Expand Down Expand Up @@ -1188,7 +1189,7 @@ span.header-sort-icon img {
height: calc(100% - 30px);
}

.window-cover-page.window-filedialog .window-body {
.window-cover-page .window-body {
height: calc(100% - 109px) !important;
}

Expand Down Expand Up @@ -1218,7 +1219,7 @@ span.header-sort-icon img {
margin: 0;
font-weight: bold;
font-size: 13px;
color: #8f96a3;
color: var(--sidebar-header-text-color);
text-shadow: 1px 1px rgb(247 247 247 / 15%);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
11 changes: 11 additions & 0 deletions src/gui/src/services/ThemeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,14 @@ export class ThemeService extends Service {
));
}
}

function adjustSidebarHeaderTextColor(hue, saturation, transparency, lightness) {
// Calculate adjusted brightness based on lightness and transparency
const adjustedLightness = lightness * (1 - transparency);
return adjustedLightness > 50 ? `hsl(${hue}, ${saturation}%, 10%)` : `hsl(${hue}, ${saturation}%, 90%)`;
}

export function updateTheme(hue, saturation, transparency, lightness) {
const sidebarHeaderTextColor = adjustSidebarHeaderTextColor(hue, saturation, transparency, lightness);
document.documentElement.style.setProperty('--sidebar-header-text-color', sidebarHeaderTextColor);
}