Make display rendering colours theme-aware.

* In particular this removes hard-coded checkerboard colours that don't
  look right on dark themes.
This commit is contained in:
baldurk
2017-08-25 12:26:30 +01:00
parent f295df15f4
commit 00e06d8ff1
35 changed files with 200 additions and 156 deletions
+3 -11
View File
@@ -164,17 +164,7 @@ int main(int argc, char *argv[])
.arg(configFilename));
}
config.SetupFormatting();
bool isDarkTheme = false;
{
float baseLum = getLuminance(application.palette().color(QPalette::Base));
float textLum = getLuminance(application.palette().color(QPalette::Text));
// if the base is dark than the text, then it's a light-on-dark theme (aka dark theme)
isDarkTheme = (baseLum < textLum);
}
bool isDarkTheme = IsDarkTheme();
bool styleSet = config.SetStyle();
@@ -186,6 +176,8 @@ int main(int argc, char *argv[])
config.SetStyle();
}
config.SetupFormatting();
Resources::Initialise();
GUIInvoke::init();