WIP
This commit is contained in:
@@ -18,7 +18,7 @@ from ..ui import albums, artists, browse, player_controls, playlists, util
|
||||
from ..ui.common import IconButton, IconToggleButton, IconMenuButton, SpinnerImage
|
||||
|
||||
|
||||
class MainWindow(Gtk.ApplicationWindow):
|
||||
class MainWindow(Handy.ApplicationWindow):
|
||||
"""Defines the main window for Sublime Music."""
|
||||
|
||||
__gsignals__ = {
|
||||
@@ -56,6 +56,8 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
super().__init__(*args, **kwargs)
|
||||
# self.set_default_size(1342, 756)
|
||||
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
|
||||
def connect_setting(setting):
|
||||
prop = setting.replace("_", "-")
|
||||
self.connect(f"notify::setting-{prop}",
|
||||
@@ -87,7 +89,7 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
self.stack.connect("notify::visible-child", lambda *_: self.sidebar_flap.set_reveal_flap(False))
|
||||
|
||||
self.titlebar = self._create_headerbar(self.stack)
|
||||
self.set_titlebar(self.titlebar)
|
||||
box.add(self.titlebar)
|
||||
|
||||
drawer = Handy.Flap(orientation=Gtk.Orientation.VERTICAL, fold_policy=Handy.FlapFoldPolicy.ALWAYS, flap_position=Gtk.PackType.END, modal=False)
|
||||
notification_container = Gtk.Overlay()
|
||||
@@ -179,7 +181,9 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
|
||||
self.sidebar_flap.set_flap(self._create_sidebar())
|
||||
|
||||
self.add(self.sidebar_flap)
|
||||
box.pack_start(self.sidebar_flap, True, True, 0)
|
||||
|
||||
self.add(box)
|
||||
|
||||
self.connect("button-release-event", self._on_button_release)
|
||||
|
||||
@@ -907,7 +911,7 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
return menu
|
||||
|
||||
def _create_settings_window(self) -> Gtk.PopoverMenu:
|
||||
window = Handy.PreferencesWindow()
|
||||
window = Handy.PreferencesWindow(can_swipe_back=True)
|
||||
|
||||
general = Handy.PreferencesPage(icon_name="emblem-system-symbolic", title="General")
|
||||
general_group = Handy.PreferencesGroup(title="General")
|
||||
|
Reference in New Issue
Block a user