Move spinner next to Close button in OperationLog footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-06 04:29:25 +02:00
parent d596a747a4
commit 255d43fcea
2 changed files with 14 additions and 12 deletions

View File

@@ -193,21 +193,23 @@ SelectionList {
border: thick $accent; border: thick $accent;
} }
#ol-header {
height: auto;
margin: 0 0 1 0;
}
#ol-title { #ol-title {
text-style: bold; text-style: bold;
color: #00cc00; color: #00cc00;
width: 1fr; margin: 0 0 1 0;
}
#ol-footer {
height: auto;
margin: 1 0 0 0;
} }
#ol-spinner { #ol-spinner {
width: auto; width: auto;
min-width: 3; min-width: 4;
height: 1; height: 1;
margin: 0 0 0 2;
content-align: left middle;
} }
#ol-log { #ol-log {
@@ -216,7 +218,7 @@ SelectionList {
} }
#ol-close { #ol-close {
margin: 1 0 0 0; margin: 0;
} }
/* Log viewer */ /* Log viewer */

View File

@@ -41,11 +41,11 @@ class OperationLog(ModalScreen[None]):
def compose(self) -> ComposeResult: def compose(self) -> ComposeResult:
with Vertical(id="op-log"): with Vertical(id="op-log"):
with Horizontal(id="ol-header"): yield Static(self._title, id="ol-title")
yield Static(self._title, id="ol-title")
yield SpinnerWidget(id="ol-spinner")
yield RichLog(id="ol-log", wrap=True, highlight=True, markup=True) yield RichLog(id="ol-log", wrap=True, highlight=True, markup=True)
yield Button("Close", variant="primary", id="ol-close") with Horizontal(id="ol-footer"):
yield Button("Close", variant="primary", id="ol-close")
yield SpinnerWidget(id="ol-spinner")
def on_mount(self) -> None: def on_mount(self) -> None:
# Flush any buffered writes # Flush any buffered writes