Skip to content

Commit 52e3e2f

Browse files
add ellipsis to dialog buttons
1 parent bc264d1 commit 52e3e2f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ class MessageBoxDialog extends AbstractDialog<MessageBoxDialog.Result> {
203203
const button = this.createButton(text);
204204
const isPrimaryButton =
205205
index === (options.buttons ? options.buttons.length - 1 : 0);
206-
button.classList.add(isPrimaryButton ? 'main' : 'secondary');
206+
button.classList.add(
207+
isPrimaryButton ? 'main' : 'secondary',
208+
'message-box-dialog-button'
209+
);
207210
this.controlPanel.appendChild(button);
208211
this.toDisposeOnDetach.push(
209212
addEventListener(button, 'click', () => {

arduino-ide-extension/src/browser/style/index.css

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ button.secondary[disabled], .theia-button.secondary[disabled] {
109109
background-color: var(--theia-secondaryButton-background);
110110
}
111111

112+
button.theia-button.message-box-dialog-button {
113+
white-space: nowrap;
114+
overflow: hidden;
115+
text-overflow: ellipsis;
116+
display: inline-block;
117+
}
118+
112119
/* To make the progress-bar slightly thicker, and use the color from the status bar */
113120
.theia-progress-bar-container {
114121
width: 100%;

0 commit comments

Comments
 (0)