2 Commits

Author SHA1 Message Date
Javanaut
2aeeaac204 ffcb 2026-07-08 09:29:12 +02:00
Javanaut
8c2a4cae96 cb 2026-07-08 09:28:52 +02:00

View File

@@ -1,7 +1,7 @@
import click
from textual.screen import Screen
from textual.widgets import Header, Footer, Static, Button, SelectionList, Select, DataTable, Input
from textual.widgets import Header, Footer, Static, Button, SelectionList, Select, DataTable, Input, Checkbox
from textual.containers import Grid
from textual.widgets._data_table import CellDoesNotExist
@@ -34,7 +34,7 @@ class TrackDetailsScreen(Screen):
Grid {
grid-size: 5 24;
grid-rows: 2 2 2 2 2 3 3 2 2 3 2 2 2 2 2 6 2 2 6 2 2 2;
grid-rows: 2 2 2 2 2 3 3 3 2 3 2 2 2 2 2 6 2 2 6 2 2 2;
grid-columns: 18 1fr 1fr 1fr 4fr;
height: 100%;
width: 100%;
@@ -256,9 +256,12 @@ class TrackDetailsScreen(Screen):
self.query_one("#type_select", Select).value = self.__trackType
self.query_one("#audio_layout_select", Select).value = self.__audioLayout
self.query_one("#drop_checkbox", SelectionList).add_option(
(t("Yes"), 0, self.__dropped)
)
# CB
self.query_one("#drop_checkbox", Checkbox).value = self.__dropped
# self.query_one("#drop_checkbox", SelectionList).add_option(
# (t("Yes"), 0, self.__dropped)
# )
for disposition in TrackDisposition:
@@ -288,7 +291,10 @@ class TrackDetailsScreen(Screen):
if self.__metadataOnly:
self.query_one("#type_select", Select).disabled = True
self.query_one("#audio_layout_select", Select).disabled = True
self.query_one("#drop_checkbox", SelectionList).disabled = True
# CB
self.query_one("#drop_checkbox", Checkbox).disabled = True
# self.query_one("#drop_checkbox", SelectionList).disabled = True
def on_select_changed(self, event: Select.Changed) -> None:
if event.select.id == "language_select":
@@ -351,7 +357,10 @@ class TrackDetailsScreen(Screen):
# Row 8
yield Static(t("Drop"))
yield SelectionList[int](id="drop_checkbox", classes="four")
# CB
yield Checkbox(id="drop_checkbox", classes="four")
# yield SelectionList[int](id="drop_checkbox", classes="four")
# Row 9
yield Static(" ", classes="five")