[skip ci] support of style sheet in branding framework

This commit is contained in:
wmayer
2019-11-09 17:36:49 +01:00
parent 10e2681ab5
commit 116c868d9e
2 changed files with 8 additions and 0 deletions

View File

@@ -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");

View File

@@ -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)) {