Make GUI layout more horizontal

This commit is contained in:
2026-04-18 23:58:01 +03:00
parent f78a130926
commit 1999ce3657

View File

@@ -208,10 +208,18 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
def _build_transport_strip(self):
frame = Gtk.Frame(label="Extraction Control Center")
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6, margin=6)
frame.add(box)
box.pack_start(self._build_controls(), False, False, 0)
box.pack_start(self._build_actions(), False, False, 0)
shell = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=10, margin=6)
frame.add(shell)
primary = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
primary.pack_start(self._build_controls(), False, False, 0)
primary.pack_start(self._build_actions(), False, False, 0)
shell.pack_start(primary, True, True, 0)
secondary = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
secondary.pack_start(self._build_disc_info_frame(), False, False, 0)
secondary.pack_start(self._build_rip_options(), False, False, 0)
shell.pack_start(secondary, False, False, 0)
return frame
def _build_controls(self):
@@ -373,7 +381,7 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
pane.set_wide_handle(True)
pane.pack1(self._build_workspace(), resize=True, shrink=False)
pane.pack2(self._build_log(), resize=False, shrink=False)
pane.set_position(560)
pane.set_position(470)
self.main_pane = pane
return pane
@@ -382,12 +390,10 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
pane.set_wide_handle(True)
pane.pack1(self._build_left_panel(), resize=False, shrink=False)
pane.pack2(self._build_right_panel(), resize=True, shrink=False)
pane.set_position(360)
pane.set_position(330)
return pane
def _build_left_panel(self):
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=8)
def _build_disc_info_frame(self):
info_frame = Gtk.Frame(label="Disc")
info_grid = Gtk.Grid(column_spacing=8, row_spacing=4, margin=6)
info_frame.add(info_grid)
@@ -410,8 +416,10 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
value = Gtk.Label(label="", xalign=0, selectable=True)
info_grid.attach(value, 1, row, 1, 1)
self.info_labels[key] = value
return info_frame
box.pack_start(info_frame, False, False, 0)
def _build_left_panel(self):
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=8)
release_frame = Gtk.Frame(label="Metadata / Releases")
release_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6, margin=6)
@@ -452,7 +460,7 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
release_box.pack_start(details_frame, False, False, 0)
box.pack_start(release_frame, True, True, 0)
box.set_size_request(420, -1)
box.set_size_request(330, -1)
return box
def _build_right_panel(self):
@@ -490,10 +498,9 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
track_scroll = Gtk.ScrolledWindow()
track_scroll.set_hexpand(True)
track_scroll.set_vexpand(True)
track_scroll.set_min_content_height(220)
track_scroll.add(self.track_view)
tracks_box.pack_start(track_scroll, True, True, 0)
tracks_box.pack_start(self._build_rip_options(), False, False, 0)
box.pack_start(tracks_frame, True, True, 0)
return box
@@ -515,7 +522,7 @@ class WhipperGui(Gtk.Application if Gtk is not None else object):
grid.attach(self.disc_template_entry, 1, 1, 3, 1)
note = Gtk.Label(
label="Advanced templates stay here; fast extraction switches moved to the control center to reduce vertical space.",
label="Templates are kept here so the lower workspace can stay focused on releases, tracks and log visibility.",
xalign=0,
)
note.set_line_wrap(True)