feat: Add customizable accent color setting

Introduce an accent color preference across the app: add a settings UI input (with restart note), persist it to AppState and config (read/write), and accept it in save_settings. Integrate the value into theming: compute a semi-transparent selection color, apply it to table selection styles, and pass it to qdarktheme as the primary color (including when window transparency is enabled). Also apply the accent to the tracker combo selection styling as a UI polish.
This commit is contained in:
Vxrtrauter
2026-04-05 06:39:29 +02:00
parent 9e3d1cf90a
commit 12506dd1df
7 changed files with 46 additions and 7 deletions
+6 -2
View File
@@ -21,13 +21,17 @@ import time
import sys
def run_gui(app):
qdarktheme.setup_theme("auto")
custom_colors = {}
if state.accent_color:
custom_colors["primary"] = state.accent_color
qdarktheme.setup_theme("auto", custom_colors=custom_colors if custom_colors else None)
widget = MainWindow()
# Check OS for window transparency compatibility and apply
if state.window_transparency and platform.system() != "Windows":
widget.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
qdarktheme.setup_theme("auto", custom_colors={"background": "#00000000"})
transparent_colors = {"background": "#00000000", **custom_colors}
qdarktheme.setup_theme("auto", custom_colors=transparent_colors)
set_main_window(widget)
widget.show()