修复控制面板插件UI bug;

This commit is contained in:
jixiaoxu 2023-03-16 11:03:16 +08:00
parent da3ad85741
commit 9d60697046
1 changed files with 6 additions and 3 deletions

View File

@ -330,9 +330,7 @@ void Notice::initConnection()
});
connect(m_enableSwitchBtn, &KSwitchButton::stateChanged, [&](bool state){
//Utils::buriedSettings(name(), "whether to get the notification from the app", QString("settings"), state ? "true" : "false");
m_globalSettings->blockSignals(true);
m_globalSettings->setReceiveNotificationsFromApps(state);
m_globalSettings->blockSignals(false);
setHiddenNoticeApp(state);
});
@ -504,6 +502,11 @@ void Notice::initItemUi(const QString &desktopPath, const UkuiNotification::Sing
menu->initStaus(settings);
menu->blockSignals(false);
connect(appSwitch, &KSwitchButton::stateChanged, [=](bool state) {
//Utils::buriedSettings(name(), "whether auto turn on do not disturb mode", QString("settings"), state ? "true" : "false");
UkuiNotification::ApplicationsSettings::self()->setAppSetting(desktopPath, UkuiNotification::SettingsProperty::AllowNotify, state);
});
connect(&settings, &UkuiNotification::SingleApplicationSettings::allowNotifyChanged, [=](bool state) {
appSwitch->blockSignals(true);
appSwitch->setChecked(state);
@ -526,7 +529,7 @@ void Notice::initItemUi(const QString &desktopPath, const UkuiNotification::Sing
});
connect(&settings, &UkuiNotification::SingleApplicationSettings::popupStyleChanged, [=](UkuiNotification::SettingsProperty::Property style) {
menu->blockSignals(true);
menu->setShowOnLockScreenEnable(style);
menu->setPopupStyle(style);
menu->blockSignals(false);
});
connect(&settings, &UkuiNotification::SingleApplicationSettings::uninstalled, [=]() {