zhangjiaping 2021-06-11 11:45:07 +08:00
parent 349130657c
commit 13cda837b7
2 changed files with 8 additions and 2 deletions

View File

@ -83,13 +83,13 @@ GlobalSettings::GlobalSettings(QObject *parent) : QObject(parent) {
connect(m_theme_gsettings, &QGSettings::changed, this, [ = ](const QString & key) {
if(key == STYLE_NAME_KEY) {
//当前主题改变时也发出paletteChanged信号通知主界面刷新
qApp->paletteChanged(qApp->palette());
m_cache.remove(STYLE_NAME_KEY);
m_cache.insert(STYLE_NAME_KEY, m_theme_gsettings->get(STYLE_NAME_KEY).toString());
} else if(key == FONT_SIZE_KEY) {
qApp->paletteChanged(qApp->palette());
} else if(key == FONT_SIZE_KEY) {
m_cache.remove(FONT_SIZE_KEY);
m_cache.insert(FONT_SIZE_KEY, m_theme_gsettings->get(FONT_SIZE_KEY).toDouble());
qApp->paletteChanged(qApp->palette());
} else if (key == ICON_THEME_KEY) {
qApp->paletteChanged(qApp->palette());
}

View File

@ -35,6 +35,12 @@ ContentWidget::ContentWidget(QWidget * parent): QStackedWidget(parent) {
<< "/usr/share/applications/eom.desktop"
<< "/usr/share/applications/pluma.desktop"
<< "/usr/share/applications/claws-mail.desktop" ;
if (QString::compare(FileUtils::getAppName(m_quicklyOpenList.at(2)), "Unknown App") == 0) {
m_quicklyOpenList.replace(2, "/usr/share/applications/kylin-photo-viewer.desktop");
}
if (QString::compare(FileUtils::getAppName(m_quicklyOpenList.at(4)), "Unknown App") == 0) {
m_quicklyOpenList.replace(4, "/usr/share/applications/org.gnome.Evolution.desktop");
}
}
ContentWidget::~ContentWidget() {