From 7caa7775ffbbfcce2c27fd0547727a7d5c4cf46f Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Tue, 20 May 2025 21:11:29 -0400 Subject: [PATCH] Force correct coloring so that text is always legible on all system themes Since NUSGet only supports a dark theme right now, but your system may use a light theme, the OS may recolor text on screen to be black on black, which is obviously bad for readability. All text will now be white, so you can always read it. And hey, maybe there will be a proper light theme soon! --- resources/right_arrow.svg | 59 +++++++++++++++++++++++++++++++++++++++ resources/style.qss | 16 +++++++++++ 2 files changed, 75 insertions(+) create mode 100644 resources/right_arrow.svg diff --git a/resources/right_arrow.svg b/resources/right_arrow.svg new file mode 100644 index 0000000..4ab9fbd --- /dev/null +++ b/resources/right_arrow.svg @@ -0,0 +1,59 @@ + + + + + + + + + + diff --git a/resources/style.qss b/resources/style.qss index 805f8b9..5b4aaaa 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -145,6 +145,7 @@ QTreeView { } QTreeView QHeaderView::section { + color: white; background-color: #2b2b2b; border: 0; font-weight: 500; @@ -170,7 +171,18 @@ QTreeView QScrollBar:vertical { margin-top: 16px; } +QTreeView::branch:has-children:!has-siblings:closed, +QTreeView::branch:closed:has-children:has-siblings { + image: url("{IMAGE_PREFIX}/right_arrow.svg"); +} + +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings { + image: url("{IMAGE_PREFIX}/down_arrow.svg"); +} + QTextBrowser { + color: white; background-color: #1a1a1a; selection-background-color: #1a73e8; } @@ -326,6 +338,10 @@ QScrollBar::sub-line:horizontal { subcontrol-origin: margin; } +QMessageBox QLabel { + color: white; +} + WrapCheckboxWidget { show-decoration-selected: 1; outline: 0;