From 09f6a2afb3e49bf3b4efb2a03e08cd130e7f5091 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Thu, 21 May 2020 19:42:58 -0600 Subject: [PATCH] Fixed a couple of display bugs --- sublime/adapters/subsonic/adapter.py | 3 ++- sublime/ui/app_styles.css | 18 ++++++++++++++++-- sublime/ui/artists.py | 8 +++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/sublime/adapters/subsonic/adapter.py b/sublime/adapters/subsonic/adapter.py index cd1a7c1..09e6311 100644 --- a/sublime/adapters/subsonic/adapter.py +++ b/sublime/adapters/subsonic/adapter.py @@ -128,8 +128,9 @@ class SubsonicAdapter(Adapter): # TODO (#112): support XML? def initial_sync(self): + print('initial_sync') # Wait for the ping to happen. - tries = 5 + tries = 0 while not self._server_available.value and tries < 5: self._set_ping_status() tries += 1 diff --git a/sublime/ui/app_styles.css b/sublime/ui/app_styles.css index 59afc39..3403203 100644 --- a/sublime/ui/app_styles.css +++ b/sublime/ui/app_styles.css @@ -61,11 +61,14 @@ } #playlist-album-artwork { + min-height: 200px; + min-width: 200px; margin: 10px 15px 0 10px; } -#artist-info-panel { - margin-bottom: 10px; +#playlist-album-artwork.collapsed { + min-height: 70px; + min-width: 70px; } #playlist-name, #artist-detail-panel #artist-name { @@ -210,9 +213,16 @@ } #artist-album-artwork { + min-width: 300px; + min-height: 300px; margin: 10px 15px 0 10px; } +#artist-album-artwork.collapsed { + min-width: 70px; + min-height: 70px; +} + #artist-album-list-artwork { margin: 10px; } @@ -225,3 +235,7 @@ #album-list-song-list-spinner { margin: 15px; } + +#artist-info-panel { + margin-bottom: 10px; +} diff --git a/sublime/ui/artists.py b/sublime/ui/artists.py index 2a6b49f..4c7e660 100644 --- a/sublime/ui/artists.py +++ b/sublime/ui/artists.py @@ -291,9 +291,9 @@ class ArtistDetailPanel(Gtk.Box): if app_config.state.selected_artist_id is None: self.big_info_panel.hide() self.album_list_scrolledwindow.hide() + self.play_shuffle_buttons.hide() else: self.update_order_token += 1 - self.big_info_panel.show() self.album_list_scrolledwindow.show() self.update_artist_view( app_config.state.selected_artist_id, @@ -316,6 +316,8 @@ class ArtistDetailPanel(Gtk.Box): if order_token != self.update_order_token: return + self.big_info_panel.show() + if app_config: self.artist_details_expanded = app_config.state.artist_details_expanded @@ -329,7 +331,7 @@ class ArtistDetailPanel(Gtk.Box): self.artist_name.set_tooltip_text(artist.name) if self.artist_details_expanded: - self.show_all() + self.artist_artwork.get_style_context().remove_class("collapsed") self.artist_name.get_style_context().remove_class("collapsed") self.artist_artwork.set_image_size(300) self.artist_indicator.set_text("ARTIST") @@ -355,8 +357,8 @@ class ArtistDetailPanel(Gtk.Box): else: self.similar_artists_scrolledwindow.hide() else: + self.artist_artwork.get_style_context().add_class("collapsed") self.artist_name.get_style_context().add_class("collapsed") - self.show_all() self.artist_artwork.set_image_size(70) self.artist_indicator.hide() self.artist_stats.hide()