From 116c868d9e2b045105faa92f5b38e5157a0434fb Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 9 Nov 2019 17:36:49 +0100 Subject: [PATCH] [skip ci] support of style sheet in branding framework --- src/App/Branding.cpp | 1 + src/Gui/Application.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/App/Branding.cpp b/src/App/Branding.cpp index 8a4a8c4682..5b79cc6aba 100644 --- a/src/App/Branding.cpp +++ b/src/App/Branding.cpp @@ -44,6 +44,7 @@ Branding::Branding() filter.push_back("WindowIcon"); filter.push_back("ProgramLogo"); filter.push_back("ProgramIcons"); + filter.push_back("StyleSheet"); filter.push_back("BuildVersionMajor"); filter.push_back("BuildVersionMinor"); diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 76d43fb475..cbdad144e1 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -2065,6 +2065,13 @@ void Application::runApplication(void) mdi->setProperty("showImage", hGrp->GetBool("TiledBackground", false)); std::string style = hGrp->GetASCII("StyleSheet"); + if (style.empty()) { + // check the branding settings + const auto& config = App::Application::Config(); + auto it = config.find("StyleSheet"); + if (it != config.end()) + style = it->second; + } if (!style.empty()) { QFile f(QLatin1String(style.c_str())); if (f.open(QFile::ReadOnly)) {