Skip to content

Commit 7bcd43b

Browse files
move primary buttons on the right of the dialogs
1 parent 0d545be commit 7bcd43b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

arduino-ide-extension/src/browser/dialogs/settings/settings-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
181181
);
182182
this.contentNode.appendChild(anchor);
183183

184-
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
185184
this.appendCloseButton(
186185
nls.localize('vscode/issueMainService/cancel', 'Cancel')
187186
);
187+
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
188188
}
189189

190190
get value(): string[] {

arduino-ide-extension/src/browser/library/library-list-widget.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ export class LibraryListWidget extends ListWidget<
126126
),
127127
message,
128128
buttons: [
129-
nls.localize('arduino/library/installAll', 'Install all'),
129+
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
130130
nls.localize(
131131
'arduino/library/installOnly',
132132
'Install {0} only',
133133
item.name
134134
),
135-
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
135+
nls.localize('arduino/library/installAll', 'Install all'),
136136
],
137137
maxWidth: 740, // Aligned with `settings-dialog.css`.
138138
}).open();
@@ -201,7 +201,8 @@ class MessageBoxDialog extends AbstractDialog<MessageBoxDialog.Result> {
201201
options.buttons || [nls.localize('vscode/issueMainService/ok', 'OK')]
202202
).forEach((text, index) => {
203203
const button = this.createButton(text);
204-
button.classList.add(index === 0 ? 'main' : 'secondary');
204+
const i = options.buttons ? options.buttons?.length - 1 : 0;
205+
button.classList.add(index === i ? 'main' : 'secondary');
205206
this.controlPanel.appendChild(button);
206207
this.toDisposeOnDetach.push(
207208
addEventListener(button, 'click', () => {

0 commit comments

Comments
 (0)