Skip to content

A full-featured download manager.

feat(appearance): add flat cloud white sidebar color (#2255)

Dr_rOota0f4fa0cb6e7
diff --git a/e2e/settings-persistence.spec.ts b/e2e/settings-persistence.spec.ts
index 7d94a2a2..df04a241 100644
--- a/e2e/settings-persistence.spec.ts
+++ b/e2e/settings-persistence.spec.ts
@@ -385,6 +385,39 @@ test('sidebar glass color previews, cancels, and survives restart after save', a
)
await openAppearance(main)
await expect(main.getByRole('radio', { name: 'Violet' })).toBeChecked()
+ await main.getByRole('radio', { name: 'Cloud White' }).check()
+ await expect(main.locator('html')).toHaveAttribute(
+ 'data-sidebar-color',
+ 'cloud'
+ )
+ const sidebar = main.locator('[data-slot="sidebar-wrapper"]')
+ for (const theme of ['light', 'dark']) {
+ await main.evaluate((theme) => {
+ document.documentElement.classList.toggle('dark', theme === 'dark')
+ }, theme)
+ await expect(sidebar).toHaveCSS('background-image', 'none')
+ const lightness = await sidebar.evaluate((element) => {
+ const color = getComputedStyle(element).backgroundColor
+ return Number(color.match(/[\d.]+/g)?.[0])
+ })
+ if (theme === 'light') expect(lightness).toBeGreaterThan(240)
+ else expect(lightness).toBeLessThan(60)
+ await main.screenshot({
+ path: testInfo.outputPath(`sidebar-cloud-${theme}.png`),
+ animations: 'disabled',
+ })
+ }
+ await main.getByRole('button', { name: 'Save', exact: true }).click()
+ await expect(main.getByRole('radio', { name: 'Cloud White' })).toBeHidden()
+ await app.close()
+ app = await launchMotrix({ userDataDir, rpcPort })
+ main = await openMain(app)
+ await openAppearance(main)
+ await expect(main.getByRole('radio', { name: 'Cloud White' })).toBeChecked()
+ await expect(main.locator('[data-slot="sidebar-wrapper"]')).toHaveCSS(
+ 'background-image',
+ 'none'
+ )
await main.getByRole('radio', { name: 'Auto' }).check()
await main.getByRole('button', { name: 'Save', exact: true }).click()
await expect(main.getByRole('radio', { name: 'Auto' })).toBeHidden()
diff --git a/src/renderer/styles/sidebar-color.css b/src/renderer/styles/sidebar-color.css
index 59255902..f3969024 100644
--- a/src/renderer/styles/sidebar-color.css
+++ b/src/renderer/styles/sidebar-color.css
@@ -64,14 +64,29 @@
--sidebar-glass-saturation: 3%;
}
-:root[data-sidebar-color]:not([data-sidebar-color="gray"]) {
+:root[data-sidebar-color]:not(
+ [data-sidebar-color="gray"],
+ [data-sidebar-color="cloud"]
+) {
--sidebar: hsl(var(--sidebar-hue) 58% 94%);
}
-:root.dark[data-sidebar-color]:not([data-sidebar-color="gray"]) {
+:root.dark[data-sidebar-color]:not(
+ [data-sidebar-color="gray"],
+ [data-sidebar-color="cloud"]
+) {
--sidebar: hsl(var(--sidebar-hue) 24% 17%);
}
+:root[data-sidebar-color="cloud"] {
+ --sidebar-cloud-tone: 220 12% 97%;
+ --sidebar: hsl(var(--sidebar-cloud-tone));
+}
+
+:root.dark[data-sidebar-color="cloud"] {
+ --sidebar-cloud-tone: 220 6% 18%;
+}
+
/* Smoothstep lightness stops avoid a visible edge around a radial highlight.
Constant alpha preserves one continuous surface over native vibrancy. */
:root[data-sidebar-color] [data-slot="sidebar-wrapper"] {
@@ -135,6 +150,12 @@
);
}
+/* A uniform neutral wash preserves native glass without directional lighting. */
+:root[data-sidebar-color="cloud"] [data-slot="sidebar-wrapper"] {
+ background-color: hsl(var(--sidebar-cloud-tone) / var(--sidebar-glass-alpha));
+ background-image: none;
+}
+
:root[data-sidebar-color] [data-slot="sidebar-inner"] {
background-color: transparent;
}
@@ -145,6 +166,9 @@
.sidebar-color-picker[data-color="gray"] {
--selection-ring-color: #96999e;
}
+.sidebar-color-picker[data-color="cloud"] {
+ --selection-ring-color: #b6bac2;
+}
.sidebar-color-picker[data-color="auto"] {
--selection-ring-color: var(--system-accent-color, #007aff);
}
@@ -161,6 +185,9 @@
.sidebar-color-swatch[data-color="gray"] {
background: #a2a4a8;
}
+.sidebar-color-swatch[data-color="cloud"] {
+ background: hsl(220 12% 97%);
+}
.sidebar-color-swatch[data-color="auto"] {
background: conic-gradient(
#ef446c,
diff --git a/src/shared/locales/ar.json b/src/shared/locales/ar.json
index aa9734d3..21414328 100644
--- a/src/shared/locales/ar.json
+++ b/src/shared/locales/ar.json
@@ -1814,6 +1814,7 @@
"sidebarColors": {
"auto": "تلقائي",
"blue": "أزرق",
+ "cloud": "أبيض سحابي",
"cyan": "سماوي",
"gold": "ذهبي",
"gray": "رمادي",
diff --git a/src/shared/locales/bg.json b/src/shared/locales/bg.json
index b061ea0d..6c5443ee 100644
--- a/src/shared/locales/bg.json
+++ b/src/shared/locales/bg.json
@@ -1738,6 +1738,7 @@
"sidebarColors": {
"auto": "Автоматично",
"blue": "Синьо",
+ "cloud": "Облачно бяло",
"cyan": "Циан",
"gold": "Златисто",
"gray": "Сиво",
diff --git a/src/shared/locales/ca.json b/src/shared/locales/ca.json
index 2767f47c..756b3080 100644
--- a/src/shared/locales/ca.json
+++ b/src/shared/locales/ca.json
@@ -1757,6 +1757,7 @@
"sidebarColors": {
"auto": "Automàtic",
"blue": "Blau",
+ "cloud": "Blanc núvol",
"cyan": "Cian",
"gold": "Daurat",
"gray": "Gris",
diff --git a/src/shared/locales/de.json b/src/shared/locales/de.json
index 4655ef5d..94326aaf 100644
--- a/src/shared/locales/de.json
+++ b/src/shared/locales/de.json
@@ -1271,15 +1271,16 @@
"byteUnitSystemDefault": "Systemvorgabe ({{units}})",
"sidebarColor": "Akzentfarbe",
"sidebarColors": {
+ "auto": "Automatisch",
"blue": "Blau",
- "violet": "Violett",
- "pink": "Rosa",
- "orange": "Orange",
- "gold": "Gold",
- "green": "Grün",
+ "cloud": "Wolkenweiß",
"cyan": "Cyan",
+ "gold": "Gold",
"gray": "Grau",
- "auto": "Automatisch"
+ "green": "Grün",
+ "orange": "Orange",
+ "pink": "Rosa",
+ "violet": "Violett"
},
"themeAndEffects": "Design und Effekte",
"languageAndDisplay": "Sprache und Anzeige",
diff --git a/src/shared/locales/el.json b/src/shared/locales/el.json
index adbe7e0a..4da0fdc4 100644
--- a/src/shared/locales/el.json
+++ b/src/shared/locales/el.json
@@ -1738,6 +1738,7 @@
"sidebarColors": {
"auto": "Αυτόματο",
"blue": "Μπλε",
+ "cloud": "Λευκό σύννεφο",
"cyan": "Κυανό",
"gold": "Χρυσαφί",
"gray": "Γκρι",
diff --git a/src/shared/locales/en-US.json b/src/shared/locales/en-US.json
index a7868181..ad817833 100644
--- a/src/shared/locales/en-US.json
+++ b/src/shared/locales/en-US.json
@@ -1271,15 +1271,16 @@
"byteUnitSystemDefault": "Follow system ({{units}})",
"sidebarColor": "Accent color",
"sidebarColors": {
+ "auto": "Auto",
"blue": "Blue",
- "violet": "Violet",
- "pink": "Pink",
- "orange": "Orange",
- "gold": "Gold",
- "green": "Green",
+ "cloud": "Cloud White",
"cyan": "Cyan",
+ "gold": "Gold",
"gray": "Gray",
- "auto": "Auto"
+ "green": "Green",
+ "orange": "Orange",
+ "pink": "Pink",
+ "violet": "Violet"
},
"themeAndEffects": "Theme and effects",
"languageAndDisplay": "Language and display",
diff --git a/src/shared/locales/es.json b/src/shared/locales/es.json
index 4c0df0f2..b219b19b 100644
--- a/src/shared/locales/es.json
+++ b/src/shared/locales/es.json
@@ -1285,15 +1285,16 @@
"byteUnitSystemDefault": "Del sistema ({{units}})",
"sidebarColor": "Color de acento",
"sidebarColors": {
+ "auto": "Automático",
"blue": "Azul",
- "violet": "Violeta",
- "pink": "Rosa",
- "orange": "Naranja",
- "gold": "Dorado",
- "green": "Verde",
+ "cloud": "Blanco nube",
"cyan": "Cian",
+ "gold": "Dorado",
"gray": "Gris",
- "auto": "Automático"
+ "green": "Verde",
+ "orange": "Naranja",
+ "pink": "Rosa",
+ "violet": "Violeta"
},
"themeAndEffects": "Tema y efectos",
"languageAndDisplay": "Idioma y visualización",
diff --git a/src/shared/locales/fa.json b/src/shared/locales/fa.json
index 2649ffd4..b49721a2 100644
--- a/src/shared/locales/fa.json
+++ b/src/shared/locales/fa.json
@@ -1738,6 +1738,7 @@
"sidebarColors": {
"auto": "خودکار",
"blue": "آبی",
+ "cloud": "سفید ابری",
"cyan": "فیروزه‌ای",
"gold": "طلایی",
"gray": "خاکستری",
diff --git a/src/shared/locales/fr.json b/src/shared/locales/fr.json
index 7ad4553b..3aab9188 100644
--- a/src/shared/locales/fr.json
+++ b/src/shared/locales/fr.json
@@ -1756,6 +1756,7 @@
"sidebarColors": {
"auto": "Auto",
"blue": "Bleu",
+ "cloud": "Blanc nuage",
"cyan": "Cyan",
"gold": "Or",
"gray": "Gris",
diff --git a/src/shared/locales/id.json b/src/shared/locales/id.json
index 1c49d3eb..eac82d18 100644
--- a/src/shared/locales/id.json
+++ b/src/shared/locales/id.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "Ikuti sistem ({{units}})",
"sidebarColor": "Warna aksen",
"sidebarColors": {
+ "auto": "Otomatis",
"blue": "Biru",
- "violet": "Ungu",
- "pink": "Merah muda",
- "orange": "Oranye",
- "gold": "Emas",
- "green": "Hijau",
+ "cloud": "Putih awan",
"cyan": "Sian",
+ "gold": "Emas",
"gray": "Abu-abu",
- "auto": "Otomatis"
+ "green": "Hijau",
+ "orange": "Oranye",
+ "pink": "Merah muda",
+ "violet": "Ungu"
},
"themeAndEffects": "Tema dan efek",
"languageAndDisplay": "Bahasa dan tampilan",
diff --git a/src/shared/locales/it.json b/src/shared/locales/it.json
index 9666aed0..0ff55e2d 100644
--- a/src/shared/locales/it.json
+++ b/src/shared/locales/it.json
@@ -1285,15 +1285,16 @@
"byteUnitSystemDefault": "Segui il sistema ({{units}})",
"sidebarColor": "Colore principale",
"sidebarColors": {
+ "auto": "Automatico",
"blue": "Blu",
- "violet": "Viola",
- "pink": "Rosa",
- "orange": "Arancione",
- "gold": "Oro",
- "green": "Verde",
+ "cloud": "Bianco nuvola",
"cyan": "Ciano",
+ "gold": "Oro",
"gray": "Grigio",
- "auto": "Automatico"
+ "green": "Verde",
+ "orange": "Arancione",
+ "pink": "Rosa",
+ "violet": "Viola"
},
"themeAndEffects": "Tema ed effetti",
"languageAndDisplay": "Lingua e visualizzazione",
diff --git a/src/shared/locales/ja.json b/src/shared/locales/ja.json
index 12bdcb29..21c751b4 100644
--- a/src/shared/locales/ja.json
+++ b/src/shared/locales/ja.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "システムに合わせる({{units}})",
"sidebarColor": "アクセントカラー",
"sidebarColors": {
+ "auto": "自動",
"blue": "ブルー",
- "violet": "バイオレット",
- "pink": "ピンク",
- "orange": "オレンジ",
- "gold": "ゴールド",
- "green": "グリーン",
+ "cloud": "クラウドホワイト",
"cyan": "シアン",
+ "gold": "ゴールド",
"gray": "グレー",
- "auto": "自動"
+ "green": "グリーン",
+ "orange": "オレンジ",
+ "pink": "ピンク",
+ "violet": "バイオレット"
},
"themeAndEffects": "テーマとエフェクト",
"languageAndDisplay": "言語と表示",
diff --git a/src/shared/locales/ko.json b/src/shared/locales/ko.json
index 10160e6a..56a414c2 100644
--- a/src/shared/locales/ko.json
+++ b/src/shared/locales/ko.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "시스템 설정 따르기({{units}})",
"sidebarColor": "강조 색상",
"sidebarColors": {
+ "auto": "자동",
"blue": "파란색",
- "violet": "보라색",
- "pink": "분홍색",
- "orange": "주황색",
- "gold": "금색",
- "green": "초록색",
+ "cloud": "클라우드 화이트",
"cyan": "청록색",
+ "gold": "금색",
"gray": "회색",
- "auto": "자동"
+ "green": "초록색",
+ "orange": "주황색",
+ "pink": "분홍색",
+ "violet": "보라색"
},
"themeAndEffects": "테마 및 효과",
"languageAndDisplay": "언어 및 표시",
diff --git a/src/shared/locales/nb.json b/src/shared/locales/nb.json
index 570fb8a2..60474724 100644
--- a/src/shared/locales/nb.json
+++ b/src/shared/locales/nb.json
@@ -1738,6 +1738,7 @@
"sidebarColors": {
"auto": "Automatisk",
"blue": "Blå",
+ "cloud": "Skyhvit",
"cyan": "Cyan",
"gold": "Gull",
"gray": "Grå",
diff --git a/src/shared/locales/nl.json b/src/shared/locales/nl.json
index 87ac9dda..a64414d3 100644
--- a/src/shared/locales/nl.json
+++ b/src/shared/locales/nl.json
@@ -1738,6 +1738,7 @@
"sidebarColors": {
"auto": "Automatisch",
"blue": "Blauw",
+ "cloud": "Wolkenwit",
"cyan": "Cyaan",
"gold": "Goud",
"gray": "Grijs",
diff --git a/src/shared/locales/pl.json b/src/shared/locales/pl.json
index e6813113..eec8eb89 100644
--- a/src/shared/locales/pl.json
+++ b/src/shared/locales/pl.json
@@ -1299,15 +1299,16 @@
"byteUnitSystemDefault": "Zgodnie z systemem ({{units}})",
"sidebarColor": "Kolor akcentu",
"sidebarColors": {
+ "auto": "Automatyczny",
"blue": "Niebieski",
- "violet": "Fioletowy",
- "pink": "Różowy",
- "orange": "Pomarańczowy",
- "gold": "Złoty",
- "green": "Zielony",
+ "cloud": "Chmurowa biel",
"cyan": "Cyjan",
+ "gold": "Złoty",
"gray": "Szary",
- "auto": "Automatyczny"
+ "green": "Zielony",
+ "orange": "Pomarańczowy",
+ "pink": "Różowy",
+ "violet": "Fioletowy"
},
"themeAndEffects": "Motyw i efekty",
"languageAndDisplay": "Język i wyświetlanie",
diff --git a/src/shared/locales/pt-BR.json b/src/shared/locales/pt-BR.json
index 43ea1c70..cc46fc1d 100644
--- a/src/shared/locales/pt-BR.json
+++ b/src/shared/locales/pt-BR.json
@@ -1285,15 +1285,16 @@
"byteUnitSystemDefault": "Seguir o sistema ({{units}})",
"sidebarColor": "Cor de destaque",
"sidebarColors": {
+ "auto": "Automática",
"blue": "Azul",
- "violet": "Violeta",
- "pink": "Rosa",
- "orange": "Laranja",
- "gold": "Dourado",
- "green": "Verde",
+ "cloud": "Branco nuvem",
"cyan": "Ciano",
+ "gold": "Dourado",
"gray": "Cinza",
- "auto": "Automática"
+ "green": "Verde",
+ "orange": "Laranja",
+ "pink": "Rosa",
+ "violet": "Violeta"
},
"themeAndEffects": "Tema e efeitos",
"languageAndDisplay": "Idioma e exibição",
diff --git a/src/shared/locales/ro.json b/src/shared/locales/ro.json
index 5714a735..701b118a 100644
--- a/src/shared/locales/ro.json
+++ b/src/shared/locales/ro.json
@@ -1757,6 +1757,7 @@
"sidebarColors": {
"auto": "Automat",
"blue": "Albastru",
+ "cloud": "Alb de nor",
"cyan": "Cian",
"gold": "Auriu",
"gray": "Gri",
diff --git a/src/shared/locales/ru.json b/src/shared/locales/ru.json
index 53eb6509..3281f494 100644
--- a/src/shared/locales/ru.json
+++ b/src/shared/locales/ru.json
@@ -1299,15 +1299,16 @@
"byteUnitSystemDefault": "Как в системе ({{units}})",
"sidebarColor": "Цвет акцента",
"sidebarColors": {
+ "auto": "Автоматически",
"blue": "Синий",
- "violet": "Фиолетовый",
- "pink": "Розовый",
- "orange": "Оранжевый",
- "gold": "Золотой",
- "green": "Зелёный",
+ "cloud": "Облачный белый",
"cyan": "Голубой",
+ "gold": "Золотой",
"gray": "Серый",
- "auto": "Автоматически"
+ "green": "Зелёный",
+ "orange": "Оранжевый",
+ "pink": "Розовый",
+ "violet": "Фиолетовый"
},
"themeAndEffects": "Тема и эффекты",
"languageAndDisplay": "Язык и отображение",
diff --git a/src/shared/locales/th.json b/src/shared/locales/th.json
index e6384d62..cf75f8f6 100644
--- a/src/shared/locales/th.json
+++ b/src/shared/locales/th.json
@@ -1719,6 +1719,7 @@
"sidebarColors": {
"auto": "อัตโนมัติ",
"blue": "น้ำเงิน",
+ "cloud": "ขาวเมฆ",
"cyan": "ฟ้าอมเขียว",
"gold": "ทอง",
"gray": "เทา",
diff --git a/src/shared/locales/tr.json b/src/shared/locales/tr.json
index df5fbc8c..1c47d7f9 100644
--- a/src/shared/locales/tr.json
+++ b/src/shared/locales/tr.json
@@ -1271,15 +1271,16 @@
"byteUnitSystemDefault": "Sistemi kullan ({{units}})",
"sidebarColor": "Vurgu rengi",
"sidebarColors": {
+ "auto": "Otomatik",
"blue": "Mavi",
- "violet": "Mor",
- "pink": "Pembe",
- "orange": "Turuncu",
- "gold": "Altın",
- "green": "Yeşil",
+ "cloud": "Bulut beyazı",
"cyan": "Camgöbeği",
+ "gold": "Altın",
"gray": "Gri",
- "auto": "Otomatik"
+ "green": "Yeşil",
+ "orange": "Turuncu",
+ "pink": "Pembe",
+ "violet": "Mor"
},
"themeAndEffects": "Tema ve efektler",
"languageAndDisplay": "Dil ve görüntüleme",
diff --git a/src/shared/locales/uk.json b/src/shared/locales/uk.json
index 0865a92e..c48dd3a6 100644
--- a/src/shared/locales/uk.json
+++ b/src/shared/locales/uk.json
@@ -1776,6 +1776,7 @@
"sidebarColors": {
"auto": "Автоматично",
"blue": "Синій",
+ "cloud": "Хмарний білий",
"cyan": "Блакитний",
"gold": "Золотий",
"gray": "Сірий",
diff --git a/src/shared/locales/vi.json b/src/shared/locales/vi.json
index 065d99b7..fd070ca6 100644
--- a/src/shared/locales/vi.json
+++ b/src/shared/locales/vi.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "Theo hệ thống ({{units}})",
"sidebarColor": "Màu nhấn",
"sidebarColors": {
+ "auto": "Tự động",
"blue": "Xanh dương",
- "violet": "Tím",
- "pink": "Hồng",
- "orange": "Cam",
- "gold": "Vàng kim",
- "green": "Xanh lá",
+ "cloud": "Trắng mây",
"cyan": "Xanh lơ",
+ "gold": "Vàng kim",
"gray": "Xám",
- "auto": "Tự động"
+ "green": "Xanh lá",
+ "orange": "Cam",
+ "pink": "Hồng",
+ "violet": "Tím"
},
"themeAndEffects": "Chủ đề và hiệu ứng",
"languageAndDisplay": "Ngôn ngữ và hiển thị",
diff --git a/src/shared/locales/zh-CN.json b/src/shared/locales/zh-CN.json
index b779c88b..0d044e8c 100644
--- a/src/shared/locales/zh-CN.json
+++ b/src/shared/locales/zh-CN.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "跟随系统({{units}})",
"sidebarColor": "主题色",
"sidebarColors": {
+ "auto": "自动",
"blue": "冰蓝",
- "violet": "鸢紫",
- "pink": "玫粉",
- "orange": "琥橙",
- "gold": "香槟",
- "green": "薄荷",
+ "cloud": "云白",
"cyan": "湖青",
+ "gold": "香槟",
"gray": "淡灰",
- "auto": "自动"
+ "green": "薄荷",
+ "orange": "琥橙",
+ "pink": "玫粉",
+ "violet": "鸢紫"
},
"themeAndEffects": "主题与效果",
"languageAndDisplay": "语言与显示",
diff --git a/src/shared/locales/zh-TW.json b/src/shared/locales/zh-TW.json
index 456d12a3..c1acc077 100644
--- a/src/shared/locales/zh-TW.json
+++ b/src/shared/locales/zh-TW.json
@@ -1257,15 +1257,16 @@
"byteUnitSystemDefault": "跟隨系統({{units}})",
"sidebarColor": "主題色",
"sidebarColors": {
+ "auto": "自動",
"blue": "冰藍",
- "violet": "鳶紫",
- "pink": "玫粉",
- "orange": "琥橙",
- "gold": "香檳",
- "green": "薄荷",
+ "cloud": "雲白",
"cyan": "湖青",
+ "gold": "香檳",
"gray": "淡灰",
- "auto": "自動"
+ "green": "薄荷",
+ "orange": "琥橙",
+ "pink": "玫粉",
+ "violet": "鳶紫"
},
"themeAndEffects": "主題與效果",
"languageAndDisplay": "語言與顯示",
diff --git a/src/shared/schemas/sidebar-color.ts b/src/shared/schemas/sidebar-color.ts
index 67078648..b1dbd7f1 100644
--- a/src/shared/schemas/sidebar-color.ts
+++ b/src/shared/schemas/sidebar-color.ts
@@ -10,6 +10,7 @@ export const sidebarColorSchema = z.enum([
'green',
'cyan',
'gray',
+ 'cloud',
])
export type SidebarColor = z.infer<typeof sidebarColorSchema>