Skip to content

Commit bba2f17

Browse files
committed
Small fixes
1 parent 9b87773 commit bba2f17

File tree

4 files changed

+36
-16
lines changed

4 files changed

+36
-16
lines changed

tests/installer/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ def set_default_executor(self) -> None:
253253

254254
batch_warner = self.get_widget_by_id('warn-no-batch')
255255
if name == 'none':
256-
batch_warner.visible = True
256+
batch_warner.remove_class('hidden')
257257
else:
258-
batch_warner.visible = False
258+
batch_warner.add_class('hidden')
259259

260260
self.scheduler_panel.set_scheduler(name)
261261

tests/installer/panels/batch_scheduler_panel.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,6 @@ def __init__(self, state: State) -> None:
227227
def _build_widgets(self) -> Widget:
228228
return Vertical(
229229
Label('Select and configure a batch system.', classes='header'),
230-
Vertical(
231-
Label('Your system does not appear to have a batch scheduler. If you are certain '
232-
'that this is wrong, you can select one below. If not, tests will be run '
233-
'using non-batch executors.', classes='help-text media-large',
234-
shrink=True, expand=True),
235-
id='warn-no-batch'
236-
),
237230
Horizontal(
238231
Vertical(
239232
Label('Batch system:', classes='form-label'),
@@ -249,6 +242,8 @@ def _build_widgets(self) -> Widget:
249242
Input(id='account-input'),
250243
classes='bs-col-2 form-row batch-valid'
251244
),
245+
Label('No batch scheduler detected.', classes='help-text',
246+
id='warn-no-batch', shrink=True, expand=True),
252247
classes='w-100 form-row', id='batch-system-group-1'
253248
),
254249
Horizontal(

tests/installer/style.tcss

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ LoadingIndicator {
213213

214214
.dialog Button {
215215
border-top: tall #80a0a0;
216-
background: #408080;
216+
background: #004040;
217217
border-bottom: tall #204040;
218218
}
219219

220220
.dialog Button:focus {
221221
border-top: tall #a0ffff;
222222
background: #60a0a0;
223-
border-top: tall #408080;
223+
border-bottom: tall #408080;
224224
}
225225

226226
.dialog Button.-error {
@@ -433,11 +433,23 @@ Button.-primary {
433433
}
434434

435435
Button.-primary:focus {
436-
border-top: tall #80a0ff;
436+
border-top: tall #a0ffff;
437437
background: #0080ff;
438438
border-bottom: tall #004080;
439439
}
440440

441+
Button.-error {
442+
border-top: tall #800000;
443+
background: #ff8080;
444+
border-bottom: tall #000000;
445+
}
446+
447+
Button.-error:focus {
448+
border-top: tall #ffa0a0;
449+
background: #ff8080;
450+
border-bottom: tall #800000;
451+
}
452+
441453
.header {
442454
color: white;
443455
margin-bottom: 2;
@@ -527,7 +539,17 @@ App.small .form-label {
527539
}
528540

529541
#warn-no-batch {
530-
height: auto;
542+
height: 100%;
543+
color: yellow;
544+
width: 30%;
545+
align: left middle;
546+
margin-top: 2;
547+
margin-left: 1;
548+
}
549+
550+
App.small #warn-no-batch {
551+
margin-top: 1;
552+
margin-left: 1;
531553
}
532554

533555
#batch-warn {
@@ -576,10 +598,14 @@ App.small .form-label {
576598
min-width: 16;
577599
width: 27;
578600
max-width: 32;
579-
margin-top: 1;
601+
margin-top: 2;
580602
margin-right: 2;
581603
}
582604

605+
App.small #cb-run-test-job {
606+
margin-top: 1;
607+
}
608+
583609
#btn-edit-attrs {
584610
margin-right: 1;
585611
width: 100%;

tests/installer/widgets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from textual.app import RenderResult
22
from typing import Optional, Any
33
from textual.binding import Binding
4-
from textual.events import Blur
5-
from textual.widgets import Select, Button, LoadingIndicator, Input
4+
from textual.widgets import Select, Button, LoadingIndicator
65

76

87
class MSelect(Select[str]):

0 commit comments

Comments
 (0)