Skip to content

Commit a0e820f

Browse files
baremetalgoCopilot
andcommitted
Complete system theme palette
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent fa279af commit a0e820f

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

interface/theme.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"#111111": "#f5f5f5",
1919
"#eeeeee": "#202020",
2020
"#1f1f1f": "#ededed",
21+
"#202020": "#f2f2f2",
2122
"#3a3a3a": "#b8b8b8",
2223
"#171717": "#f0f0f0",
2324
"#181818": "#f7f7f7",
@@ -37,6 +38,7 @@
3738
"#555555": "#8a8a8a",
3839
"#6a6a6a": "#8a8a8a",
3940
"#1d1d1d": "#f0f0f0",
41+
"#1a1a1a": "#e8e8e8",
4042
"#777777": "#6a6a6a",
4143
"#333333": "#b8b8b8",
4244
"#4a4a4a": "#a0a0a0",

tests/test_theme.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
from __future__ import annotations
22

3-
from interface.theme import DARK_THEME, SYSTEM_THEME, THEME_PREFERENCE_VERSION, project_theme
3+
from interface.theme import (
4+
DARK_THEME,
5+
SYSTEM_THEME,
6+
THEME_PREFERENCE_VERSION,
7+
_stylesheet_for_theme,
8+
project_theme,
9+
)
410

511

612
def test_legacy_project_theme_defaults_to_dark() -> None:
@@ -16,3 +22,11 @@ def test_versioned_system_project_theme_is_preserved() -> None:
1622
"theme_preference_version": THEME_PREFERENCE_VERSION,
1723
}
1824
) == SYSTEM_THEME
25+
26+
27+
def test_system_theme_replaces_dark_control_surfaces() -> None:
28+
"""System colors do not retain Dark rail, header, or disabled button backgrounds."""
29+
stylesheet = _stylesheet_for_theme(SYSTEM_THEME)
30+
assert "QPushButton#NavButton {\n background: #f2f2f2;" in stylesheet
31+
assert "QHeaderView::section {\n background: #f2f2f2;" in stylesheet
32+
assert "QPushButton:disabled {\n background: #e8e8e8;" in stylesheet

0 commit comments

Comments
 (0)