mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Enable RDStyle by default, add style selection in the settings dialog
This commit is contained in:
@@ -166,6 +166,26 @@ int main(int argc, char *argv[])
|
||||
|
||||
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 styleSet = config.SetStyle();
|
||||
|
||||
// unrecognised style, or empty (none set), choose a default
|
||||
if(!styleSet)
|
||||
{
|
||||
config.UIStyle = isDarkTheme ? lit("RDDark") : lit("RDLight");
|
||||
|
||||
config.SetStyle();
|
||||
}
|
||||
|
||||
Resources::Initialise();
|
||||
|
||||
GUIInvoke::init();
|
||||
|
||||
Reference in New Issue
Block a user