mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user