fix: special shortcut for Windows live notifications (#5975)
This commit is contained in:
@@ -49,6 +49,16 @@ NotificationPage::NotificationPage()
|
||||
#if defined(Q_OS_WIN) || defined(CHATTERINO_WITH_LIBNOTIFY)
|
||||
settings.append(this->createCheckBox(
|
||||
"Show notification", getSettings()->notificationToast));
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
settings.append(this->createCheckBox(
|
||||
"Create start menu shortcut (requires "
|
||||
"restart)",
|
||||
getSettings()->createShortcutForToasts,
|
||||
"When enabled, a shortcut will be created inside your "
|
||||
"start menu folder if needed by live notifications."
|
||||
"\n(On portable mode, this is disabled by "
|
||||
"default)"));
|
||||
|
||||
auto openIn = settings.emplace<QHBoxLayout>().withoutMargin();
|
||||
{
|
||||
|
||||
@@ -88,9 +88,11 @@ void SettingsPage::setTab(SettingsDialogTab *tab)
|
||||
}
|
||||
|
||||
QCheckBox *SettingsPage::createCheckBox(
|
||||
const QString &text, pajlada::Settings::Setting<bool> &setting)
|
||||
const QString &text, pajlada::Settings::Setting<bool> &setting,
|
||||
const QString &toolTipText)
|
||||
{
|
||||
QCheckBox *checkbox = new SCheckBox(text);
|
||||
checkbox->setToolTip(toolTipText);
|
||||
|
||||
// update when setting changes
|
||||
setting.connect(
|
||||
|
||||
@@ -57,7 +57,8 @@ public:
|
||||
void setTab(SettingsDialogTab *tab);
|
||||
|
||||
QCheckBox *createCheckBox(const QString &text,
|
||||
pajlada::Settings::Setting<bool> &setting);
|
||||
pajlada::Settings::Setting<bool> &setting,
|
||||
const QString &toolTipText = {});
|
||||
QComboBox *createComboBox(const QStringList &items,
|
||||
pajlada::Settings::Setting<QString> &setting);
|
||||
QLineEdit *createLineEdit(pajlada::Settings::Setting<QString> &setting);
|
||||
|
||||
Reference in New Issue
Block a user