mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
fixed max size of SongPopover and AlbumPopover
This commit is contained in:
parent
58a7385186
commit
33e57b9e7f
17
bin/mpdevil
17
bin/mpdevil
@ -1389,7 +1389,8 @@ class SongPopover(Gtk.Popover):
|
||||
# packing
|
||||
scroll=Gtk.ScrolledWindow(border_width=3)
|
||||
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
scroll.set_max_content_height(600) # TODO
|
||||
window=self.get_toplevel()
|
||||
scroll.set_max_content_height(window.get_size()[1]//3)
|
||||
scroll.set_propagate_natural_height(True)
|
||||
scroll.add(treeview)
|
||||
self.add(scroll)
|
||||
@ -1551,8 +1552,7 @@ class AlbumPopover(Gtk.Popover):
|
||||
|
||||
# adding vars
|
||||
self._client=client
|
||||
self._settings=settings
|
||||
songs=self._client.wrapped_call("find", "album", album, "date", year, self._settings.get_artist_type(), album_artist)
|
||||
songs=self._client.wrapped_call("find", "album", album, "date", year, settings.get_artist_type(), album_artist)
|
||||
|
||||
# store
|
||||
# (track, title (artist), duration, file)
|
||||
@ -1579,7 +1579,8 @@ class AlbumPopover(Gtk.Popover):
|
||||
|
||||
# scroll
|
||||
scroll=songs_window.get_scroll()
|
||||
scroll.set_max_content_height(self._settings.get_int("height")//3) # TODO
|
||||
window=self.get_toplevel()
|
||||
scroll.set_max_content_height(window.get_size()[1]//3)
|
||||
scroll.set_propagate_natural_height(True)
|
||||
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
|
||||
scroll.set_property("margin-start", 3)
|
||||
@ -2232,7 +2233,7 @@ class AlbumWindow(FocusFrame):
|
||||
class Browser(Gtk.Paned):
|
||||
__gsignals__={"search_focus_changed": (GObject.SignalFlags.RUN_FIRST, None, (bool,))}
|
||||
|
||||
def __init__(self, client, settings, window):
|
||||
def __init__(self, client, settings):
|
||||
super().__init__(orientation=Gtk.Orientation.HORIZONTAL) # paned1
|
||||
|
||||
# adding vars
|
||||
@ -2892,7 +2893,7 @@ class PlaylistWindow(Gtk.Box):
|
||||
self.set_property("visible", visibility)
|
||||
|
||||
class CoverPlaylistWindow(Gtk.Paned):
|
||||
def __init__(self, client, settings, window):
|
||||
def __init__(self, client, settings):
|
||||
super().__init__()
|
||||
|
||||
# adding vars
|
||||
@ -3568,8 +3569,8 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
else:
|
||||
icons={"open-menu-symbolic": AutoSizedIcon("open-menu-symbolic", "icon-size", self._settings)}
|
||||
|
||||
self._browser=Browser(self._client, self._settings, self)
|
||||
self._cover_playlist_window=CoverPlaylistWindow(self._client, self._settings, self)
|
||||
self._browser=Browser(self._client, self._settings)
|
||||
self._cover_playlist_window=CoverPlaylistWindow(self._client, self._settings)
|
||||
playback_control=PlaybackControl(self._client, self._settings)
|
||||
seek_bar=SeekBar(self._client)
|
||||
playback_options=PlaybackOptions(self._client, self._settings)
|
||||
|
Loading…
Reference in New Issue
Block a user