From e511d471fc9ae0e3a2d8488b06063012435a6ff0 Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Sun, 14 Feb 2021 03:09:13 +1100 Subject: [PATCH] WIP --- sublime_music/ui/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sublime_music/ui/main.py b/sublime_music/ui/main.py index 06981c0..0814a04 100644 --- a/sublime_music/ui/main.py +++ b/sublime_music/ui/main.py @@ -52,6 +52,8 @@ class MainWindow(Handy.ApplicationWindow): setting_prefetch_amount = GObject.Property(type=int, default=0) setting_concurrent_download_limit = GObject.Property(type=int, default=0) + is_desktop = False + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # self.set_default_size(1342, 756) @@ -669,9 +671,9 @@ class MainWindow(Handy.ApplicationWindow): squeezer.add(mobile_header) def squeezer_changed(squeezer, _): - is_desktop = squeezer.get_visible_child() == desktop_header + self.is_desktop = squeezer.get_visible_child() == desktop_header - self.sidebar_flap.set_swipe_to_open(not is_desktop) + self.sidebar_flap.set_swipe_to_open(not self.is_desktop) # When transitioning, don't play the reveal animation dur = self.sidebar_flap.get_reveal_duration() @@ -1093,6 +1095,10 @@ class MainWindow(Handy.ApplicationWindow): def _show_settings(self, *args): window = self._create_settings_window() window.set_transient_for(self) + + if not self.is_desktop and self.is_maximized(): + window.maximize() + window.show_all() def _on_search_entry_focus(self, *args):