Skip to content

Commit

Permalink
[skip ci] support of style sheet in branding framework
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 9, 2019
1 parent 86b22fe commit fd9054b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/App/Branding.cpp
Expand Up @@ -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");
Expand Down
7 changes: 7 additions & 0 deletions src/Gui/Application.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit fd9054b

Please sign in to comment.