Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/tab_switcher): respect workspace background color

Elian Doran740b1093d7b9
diff --git a/apps/client/src/services/css_class_manager.ts b/apps/client/src/services/css_class_manager.ts
index de1c98b87d..06ff7b7045 100644
--- a/apps/client/src/services/css_class_manager.ts
+++ b/apps/client/src/services/css_class_manager.ts
@@ -49,7 +49,7 @@ function createClassForColor(colorString: string | null) {
return clsx("use-note-color", className, colorsWithHue.has(className) && "with-hue");
}
-function parseColor(color: string) {
+export function parseColor(color: string) {
try {
return Color(color.toLowerCase());
} catch (ex) {
@@ -77,7 +77,7 @@ function adjustColorLightness(color: ColorInstance, lightThemeMaxLightness: numb
}
/** Returns the hue of the specified color, or undefined if the color is grayscale. */
-function getHue(color: ColorInstance) {
+export function getHue(color: ColorInstance) {
const hslColor = color.hsl();
if (hslColor.saturationl() > 0) {
return hslColor.hue();
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
index a8771562ce..f4fc31f3c7 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
@@ -15,6 +15,11 @@
min-width: 0;
overflow: hidden;
+ &.with-hue {
+ background-color: hsl(var(--bg-hue), 8.8%, 11.2%);
+ border-color: hsl(var(--bg-hue), 9.4%, 25.1%);
+ }
+
&.active {
outline: 4px solid var(--more-accented-background-color);
background: var(--card-background-hover-color);
@@ -26,7 +31,7 @@
header {
padding: 0.4em 0.5em;
- border-bottom: 1px solid var(--main-border-color);
+ border-bottom: 1px solid rgba(150, 150, 150, 0.1);
display: flex;
overflow: hidden;
align-items: center;