Removed the min window height and width.

Made the boards config dialog slightly smaller.

Closes #216.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2021-03-19 14:51:08 +01:00 committed by Akos Kitta
parent 26a1db3cf8
commit 4e7f8291e8
3 changed files with 23 additions and 31 deletions

View File

@ -69,7 +69,7 @@ export class BoardsConfigDialog extends AbstractDialog<BoardsConfig.Config> {
'Select both a Board and a Port if you want to upload a sketch.', 'Select both a Board and a Port if you want to upload a sketch.',
'If you only select a Board you will be able just to compile, but not to upload your sketch.' 'If you only select a Board you will be able just to compile, but not to upload your sketch.'
]) { ]) {
const p = document.createElement('p'); const p = document.createElement('div');
p.textContent = paragraph; p.textContent = paragraph;
text.appendChild(p); text.appendChild(p);
} }

View File

@ -1,5 +1,5 @@
div#select-board-dialog { div#select-board-dialog {
margin: 5px 20px 50px 20px; margin: 5px;
} }
div#select-board-dialog .selectBoardContainer .body { div#select-board-dialog .selectBoardContainer .body {
@ -7,8 +7,8 @@ div#select-board-dialog .selectBoardContainer .body {
overflow: hidden; overflow: hidden;
} }
div.dialogContent.select-board-dialog > div.head { .select-board-dialog .head {
padding-left: 21px; margin: 5px;
} }
div.dialogContent.select-board-dialog > div.head .title { div.dialogContent.select-board-dialog > div.head .title {
@ -16,11 +16,7 @@ div.dialogContent.select-board-dialog > div.head .title {
letter-spacing: .02em; letter-spacing: .02em;
font-size: 1.2em; font-size: 1.2em;
color: var(--theia-arduino-branding-primary); color: var(--theia-arduino-branding-primary);
margin: 17px 0; margin-bottom: 10px;
}
div#select-board-dialog .selectBoardContainer .head .text {
margin-bottom: 21px;
} }
div#select-board-dialog .selectBoardContainer .body .list .item.selected { div#select-board-dialog .selectBoardContainer .body .list .item.selected {
@ -57,6 +53,8 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
#select-board-dialog .selectBoardContainer .body .container { #select-board-dialog .selectBoardContainer .body .container {
flex: 1; flex: 1;
padding: 0px 10px 0px 0px; padding: 0px 10px 0px 0px;
min-width: 240px;
max-width: 240px;
} }
#select-board-dialog .selectBoardContainer .body .left.container .content { #select-board-dialog .selectBoardContainer .body .left.container .content {
@ -82,15 +80,17 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
color: var(--theia-arduino-branding-secondary); color: var(--theia-arduino-branding-secondary);
padding: 10px 5px 10px 10px; padding: 10px 5px 10px 10px;
text-transform: uppercase; text-transform: uppercase;
/* The max, min-height comes from `.body .list` 265px + 47px top padding - 2 * 10px top padding */ /* The max, min-height comes from `.body .list` 200px + 47px top padding - 2 * 10px top padding */
max-height: 292px; max-height: 227px;
min-height: 292px; min-height: 227px;
} }
#select-board-dialog .selectBoardContainer .body .list .item { #select-board-dialog .selectBoardContainer .body .list .item {
padding: 10px 5px 10px 10px; padding: 10px 5px 10px 10px;
display: flex; display: flex;
justify-content: end; justify-content: end;
white-space: nowrap;
overflow-x: hidden;
} }
#select-board-dialog .selectBoardContainer .body .list .item .selected-icon { #select-board-dialog .selectBoardContainer .body .list .item .selected-icon {
@ -114,9 +114,17 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
background: var(--theia-secondaryButton-hoverBackground); background: var(--theia-secondaryButton-hoverBackground);
} }
#select-board-dialog .selectBoardContainer .body .list .label {
max-width: 215px;
width: 215px;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
}
#select-board-dialog .selectBoardContainer .body .list { #select-board-dialog .selectBoardContainer .body .list {
max-height: 265px; max-height: 200px;
min-height: 265px; min-height: 200px;
overflow-y: auto; overflow-y: auto;
} }
@ -132,14 +140,8 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
} }
.p-Widget.dialogOverlay .dialogContent.select-board-dialog { .p-Widget.dialogOverlay .dialogContent.select-board-dialog {
width: 740px; width: 500px;
} }
.dialogControl {
margin: 0 20px 30px 0;
}
.arduino-boards-toolbar-item-container { .arduino-boards-toolbar-item-container {
margin-left: 3px; margin-left: 3px;
} }

View File

@ -82,16 +82,6 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
return electronWindow; return electronWindow;
} }
protected async getDefaultBrowserWindowOptions(): Promise<TheiaBrowserWindowOptions> {
const options = await super.getDefaultBrowserWindowOptions();
return {
...options,
// Set and use a custom minimum window size: https://github.com/arduino/arduino-pro-ide/issues/337#issuecomment-687017281
minWidth: 900,
minHeight: 800
};
}
protected async startBackend(): Promise<number> { protected async startBackend(): Promise<number> {
// Check if we should run everything as one process. // Check if we should run everything as one process.
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1; const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;