Utility method to check if a theme is supposed to be in dark or light mode. (#6785)

* Utility method to check if a theme is supposed to be in dark or light mode.

Took 22 minutes

Took 4 seconds

* Method is public.

Took 3 minutes

* Add a utility method to check if we're using a built-in theme

Took 3 minutes

Took 3 seconds

* Use built-in theme detection for home screen.

Took 6 minutes

* Re-polish on theme change

Took 2 minutes

* Fetch background on theme change.

Took 4 minutes

Took 6 seconds

* No need to double polish.

Took 4 minutes

* No need to repaint.

Took 32 seconds

* Only repolish visible widgets.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-05-08 13:47:14 +02:00 committed by GitHub
parent 43bee2316e
commit a4c2b1411f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 77 additions and 11 deletions

View file

@ -54,6 +54,8 @@ protected:
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
public:
bool isBuiltInTheme();
bool isDarkMode();
QStringMap &getAvailableThemes();
QBrush &getBgBrush(Role zone);