Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Reset button in taskbar config dialog #1742

Merged
merged 1 commit into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions plugin-taskbar/lxqttaskbarconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,12 @@ void LXQtTaskbarConfiguration::saveSettings()
settings().setValue(QStringLiteral("wheelEventsAction"),ui->wheelEventsActionCB->itemData(ui->wheelEventsActionCB->currentIndex()));
settings().setValue(QStringLiteral("wheelDeltaThreshold"),ui->wheelDeltaThresholdSB->value());
}

void LXQtTaskbarConfiguration::dialogButtonsAction(QAbstractButton *btn)
{
LXQtPanelPluginConfigDialog::dialogButtonsAction(btn);
// also, apply the changes if the Reset button is clicked
QDialogButtonBox *box = qobject_cast<QDialogButtonBox*>(btn->parent());
if (box && box->buttonRole(btn) == QDialogButtonBox::ResetRole)
saveSettings();
}
2 changes: 2 additions & 0 deletions plugin-taskbar/lxqttaskbarconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class LXQtTaskbarConfiguration : public LXQtPanelPluginConfigDialog
*/
void loadSettings();

void dialogButtonsAction(QAbstractButton *btn);

private slots:
void saveSettings();
};
Expand Down