Skip to content

Commit b6500d0

Browse files
committed
11565: Made the Cancel button the accent button on the confirm Reset Preferences and Revert to Factory Settings dialogs
1 parent 4539374 commit b6500d0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/appshell/internal/applicationactioncontroller.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,14 @@ void ApplicationActionController::revertToFactorySettings()
326326
"The list of recent scores will also be cleared.\n\n"
327327
"This action will not delete any of your scores.");
328328

329+
IInteractive::ButtonData cancelBtn = interactive()->buttonData(IInteractive::Button::Cancel);
330+
cancelBtn.accent = true;
331+
329332
int revertBtn = int(IInteractive::Button::Apply);
330333
IInteractive::Result result = interactive()->warning(title, question,
331-
{ interactive()->buttonData(IInteractive::Button::Cancel),
332-
IInteractive::ButtonData(revertBtn, muse::trc("appshell", "Revert"), true) },
333-
revertBtn);
334+
{ cancelBtn,
335+
IInteractive::ButtonData(revertBtn, muse::trc("appshell", "Revert")) },
336+
cancelBtn.btn);
334337

335338
if (result.standardButton() == IInteractive::Button::Cancel) {
336339
return;

src/appshell/view/preferences/preferencesmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ bool PreferencesModel::askForConfirmationOfPreferencesReset()
216216

217217
muse::IInteractive::ButtonData cancelBtn = interactive()->buttonData(muse::IInteractive::Button::Cancel);
218218
muse::IInteractive::ButtonData resetBtn = interactive()->buttonData(muse::IInteractive::Button::Reset);
219-
resetBtn.accent = true;
219+
cancelBtn.accent = true;
220220

221221
muse::IInteractive::Result result = interactive()->warning(title, question, { cancelBtn, resetBtn }, cancelBtn.btn);
222222
return result.standardButton() == muse::IInteractive::Button::Reset;

0 commit comments

Comments
 (0)