mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
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:
+6
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user