Set max width for tracks on Cover panel (close #64)

This commit is contained in:
coderkun 2020-03-21 23:30:48 +01:00
parent 8ecc7176d7
commit 14d56452b6
2 changed files with 5 additions and 3 deletions

View file

@ -1368,12 +1368,13 @@
<property name="halign">end</property>
<property name="transition_type">slide-right</property>
<child>
<object class="GtkScrolledWindow">
<object class="GtkScrolledWindow" id="cover-info-scroll">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="max_content_width">200</property>
<property name="propagate_natural_width">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
@ -1454,7 +1455,6 @@
<object class="GtkScale" id="cover-songs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="orientation">vertical</property>
<property name="restrict_to_fill_level">False</property>
<property name="digits">0</property>

View file

@ -992,6 +992,7 @@ class CoverPanel(GObject.GObject):
self._cover_stack.set_visible_child(self._cover_scroll)
self._cover_pixbuf = self._get_default_image()
# Album Infos
self._cover_info_scroll = builder.get_object('cover-info-scroll')
self._info_revealer = builder.get_object('cover-info-revealer')
self._info_box = builder.get_object('cover-info-box')
self._album_title_label = builder.get_object('cover-album')
@ -1037,6 +1038,7 @@ class CoverPanel(GObject.GObject):
def on_cover_size_allocate(self, widget, allocation):
GObject.idle_add(self._resize_image)
self._cover_info_scroll.set_max_content_width(allocation.width // 2)
def on_songs_start_change(self, widget, event):