mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 16:13:54 -07:00
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:
parent
43bee2316e
commit
a4c2b1411f
3 changed files with 77 additions and 11 deletions
|
|
@ -54,6 +54,8 @@ protected:
|
|||
QBrush loadExtraBrush(QString fileName, QBrush &fallbackBrush);
|
||||
|
||||
public:
|
||||
bool isBuiltInTheme();
|
||||
bool isDarkMode();
|
||||
QStringMap &getAvailableThemes();
|
||||
|
||||
QBrush &getBgBrush(Role zone);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue