- switch (mode)
- {
- case SystemDayNight::DAYNIGHTMODE_DAY:
- m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY;
- mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_day.png);"));
- mp_ui->comboBoxLanguage->setStyleSheet(QString("QComboBox { \
- border: 1px solid #D3D3D3; \
- border-radius: 8px; \
- background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255)); \
- color: #333; \
- padding: 0px; \
- } \
- QComboBox:on { \
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \
- } \
- QComboBox::drop-down { \
- border: 0px solid; \
- border-radius: 0px; \
- } \
- QComboBox::down-arrow:on { \
- }"));
- // settings icon
- mp_ui->widget_Settings_Icon->setStyleSheet(QString("border-image: url(:/icons/settings_day.png) 0 0 0 0 stretch stretch;"));
- break;
- case SystemDayNight::DAYNIGHTMODE_NIGHT:
- m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT;
- mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_night.png);"));
- mp_ui->comboBoxLanguage->setStyleSheet(QString("QComboBox { \
- border: 1px solid #D3D3D3; \
- border-radius: 8px; \
- background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(147, 147, 151, 255), stop:1 rgba(255, 255, 255, 255)); \
- color: #333; \
- padding: 0px; \
- } \
- QComboBox:on { \
- background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \
- } \
- QComboBox::drop-down { \
- border: 0px solid; \
- border-radius: 0px; \
- } \
- QComboBox::down-arrow:on { \
- }"));
- // settings icon
- mp_ui->widget_Settings_Icon->setStyleSheet(QString("border-image: url(:/icons/settings_night.png) 0 0 0 0 stretch stretch;"));
- break;
- default:
- m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED;
- }
+ QSettings settings;
+ QSettings settings_cs(QApplication::applicationDirPath() +
+ "/colorschemes/" +
+ settings.value("systemsettings/colorscheme", "default").toString() +
+ "/" +
+ QString::number(settings.value("systemsettings/proximityobjectdetected", false).toBool()) +
+ "/" +
+ QString::number(settings.value("systemsettings/daynightmode", SystemDayNight::DAYNIGHTMODE_DAY).toInt()) +
+ ".ini",
+ QSettings::IniFormat);
+
+ mp_ui->widget_background->setStyleSheet(settings_cs.value("SettingsWidget/widget_background_css").toString());
+ mp_ui->comboBox_language->setStyleSheet(settings_cs.value("SettingsWidget/comboBox_language_css").toString());
+ mp_ui->comboBox_colorScheme->setStyleSheet(settings_cs.value("SettingsWidget/comboBox_colorScheme_css").toString());
+ mp_ui->widget_settingsIcon->setStyleSheet(settings_cs.value("SettingsWidget/widget_settingsIcon_css").toString());