From d35dd2c96dd55946c8062036420b2b721d6728d4 Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Sun, 9 Jan 2022 00:33:09 +1100 Subject: [PATCH] WIP --- sublime_music/ui/main.py | 14 +++++++++++--- sublime_music/ui/providers.py | 5 ++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sublime_music/ui/main.py b/sublime_music/ui/main.py index 92589fb..eba7fe5 100644 --- a/sublime_music/ui/main.py +++ b/sublime_music/ui/main.py @@ -949,6 +949,10 @@ class DownloadsWindow(Handy.Window): header_bar = Handy.HeaderBar(show_close_button=True, title="Downloads") box.add(header_bar) + clamp = Handy.Clamp(margin=12) + + inner_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + current_downloads_header = Gtk.Box() current_downloads_header.add( current_downloads_label := Gtk.Label( @@ -966,7 +970,7 @@ class DownloadsWindow(Handy.Window): self.retry_all_button.connect("clicked", self._on_retry_all_clicked) current_downloads_header.pack_end(self.retry_all_button, False, False, 0) - box.add(current_downloads_header) + inner_box.add(current_downloads_header) self.stack = Gtk.Stack() @@ -989,7 +993,7 @@ class DownloadsWindow(Handy.Window): ) self.stack.add(self.placeholder) - box.pack_start(self.stack, True, True, 5) + inner_box.pack_start(self.stack, True, True, 5) button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) @@ -1003,7 +1007,11 @@ class DownloadsWindow(Handy.Window): button.connect("clicked", self._clear_entire_cache) button_box.pack_end(button, False, False, 5) - box.add(button_box) + inner_box.add(button_box) + + clamp.add(inner_box) + + box.pack_start(clamp, True, True, 0) self.add(box) diff --git a/sublime_music/ui/providers.py b/sublime_music/ui/providers.py index 165f24b..828b7c1 100644 --- a/sublime_music/ui/providers.py +++ b/sublime_music/ui/providers.py @@ -192,6 +192,8 @@ class ConfigureProviderPage(Gtk.Box): self.status_revealer = Gtk.Revealer(reveal_child=False) box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=10, margin=10) + clamp = Handy.Clamp() + self.status_stack = Gtk.Stack() self.status_spinner = Gtk.Spinner() @@ -208,7 +210,8 @@ class ConfigureProviderPage(Gtk.Box): self.status_label = Gtk.Label(ellipsize=Pango.EllipsizeMode.END, lines=4, justify=Gtk.Justification.LEFT, wrap=True) box.pack_start(self.status_label, False, True, 0) - self.status_revealer.add(box) + clamp.add(box) + self.status_revealer.add(clamp) self.pack_start(self.status_revealer, False, True, 0)