Skip to content

Commit da25e67

Browse files
committed
Move Open button from action bar to the Destination row
1 parent 77b672d commit da25e67

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

discvault/ui/app.tcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Button {
298298

299299
#btn-config { min-width: 12; }
300300
#btn-copy-log { min-width: 12; margin-left: 1; height: 100%; }
301-
#btn-target { width: auto; min-width: 0; margin-left: 0; }
301+
#btn-target { width: auto; min-width: 0; margin-left: 1; }
302302
#btn-outputs { min-width: 15; margin-left: 2; }
303303
#btn-extras { min-width: 0; width: auto; margin-left: 1; }
304304
#btn-eject { min-width: 12; margin-left: 2; }

discvault/ui/tui.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ def compose(self) -> ComposeResult:
596596
yield Label("Destination", classes="tag-lbl")
597597
yield Input(placeholder="", id="target-dir-input", compact=True)
598598
yield Button("Browse…", id="btn-browse", compact=True)
599+
yield Button("Open", id="btn-target", compact=True, disabled=True)
599600

600601
# Running phase: progress bars
601602
with Vertical(id="progress-section"):
@@ -673,7 +674,6 @@ def compose(self) -> ComposeResult:
673674
yield Button("Extras", id="btn-extras", disabled=True)
674675
with Horizontal(id="action-right"):
675676
yield Button("Outputs", id="btn-outputs")
676-
yield Button("Open Library", id="btn-target", disabled=True)
677677
yield Button("Eject CD", id="btn-eject", disabled=True)
678678
yield Button("Start", id="btn-start", variant="success", disabled=True)
679679
yield Button("Quit", id="btn-cancel", variant="error")
@@ -1112,8 +1112,9 @@ def _refresh_target_button(self) -> None:
11121112
except Exception:
11131113
return
11141114

1115-
path, label, _ = self._target_button_destination()
1116-
btn.label = label
1115+
# The button now lives on the Destination row with the static label
1116+
# "Open"; only its enabled state needs refreshing.
1117+
path, _label, _ = self._target_button_destination()
11171118
btn.disabled = (
11181119
self.phase not in {"ready", "done", "error"}
11191120
or self._operation_busy

0 commit comments

Comments
 (0)