diff --git a/app/settings.py b/app/settings.py index 81148df2..ebe37d3b 100644 --- a/app/settings.py +++ b/app/settings.py @@ -620,6 +620,14 @@ class Settings: def dark_mode(self, value): self._settings["dark_mode"] = value + @property + def alternate_layout(self): + return self._settings.get("alternate_layout", IS_DARWIN) + + @alternate_layout.setter + def alternate_layout(self, value): + self._settings["alternate_layout"] = value + @property def is_themes_support(self): return self._settings.get("is_themes_support", False) diff --git a/app/ui/settings_dialog.glade b/app/ui/settings_dialog.glade index 1fbe3879..280b4ec4 100644 --- a/app/ui/settings_dialog.glade +++ b/app/ui/settings_dialog.glade @@ -2465,24 +2465,50 @@ Author: Dmitriy Yefremov vertical 5 - + True False 0 in - + True False 5 5 5 5 + vertical + 5 - + True False - Enable Dark Mode + + + True + False + Enable Dark Mode + + + False + True + 0 + + + + + True + True + + + + False + True + end + 1 + + False @@ -2491,15 +2517,39 @@ Author: Dmitriy Yefremov - + True - True - + False + Enables an alternate layout of the main window elements. + + + True + False + Enable alternate layout + + + False + True + 0 + + + + + True + True + + + + False + True + end + 1 + + False True - end 1 @@ -2557,7 +2607,7 @@ Author: Dmitriy Yefremov True True - + False @@ -2796,7 +2846,7 @@ Author: Dmitriy Yefremov True False - + False diff --git a/app/ui/settings_dialog.py b/app/ui/settings_dialog.py index 9fe6d85a..78c5fbdd 100644 --- a/app/ui/settings_dialog.py +++ b/app/ui/settings_dialog.py @@ -61,7 +61,7 @@ class SettingsDialog: "on_theme_changed": self.on_theme_changed, "on_theme_add": self.on_theme_add, "on_theme_remove": self.on_theme_remove, - "on_icon_theme_changed": self.on_icon_theme_changed, + "on_appearance_changed": self.on_appearance_changed, "on_icon_theme_add": self.on_icon_theme_add, "on_icon_theme_remove": self.on_icon_theme_remove} @@ -196,6 +196,7 @@ class SettingsDialog: self._theme_combo_box = builder.get_object("theme_combo_box") self._icon_theme_combo_box = builder.get_object("icon_theme_combo_box") self._dark_mode_switch = builder.get_object("dark_mode_switch") + self._layout_switch = builder.get_object("layout_switch") self._themes_support_switch = builder.get_object("themes_support_switch") self._themes_support_switch.bind_property("active", builder.get_object("gtk_theme_frame"), "sensitive") self._themes_support_switch.bind_property("active", builder.get_object("icon_theme_frame"), "sensitive") @@ -361,6 +362,7 @@ class SettingsDialog: if self._ext_settings.is_darwin: self._ext_settings.dark_mode = self._dark_mode_switch.get_active() + self._ext_settings.alternate_layout = self._layout_switch.get_active() self._ext_settings.is_themes_support = self._themes_support_switch.get_active() self._ext_settings.theme = self._theme_combo_box.get_active_id() self._ext_settings.icon_theme = self._icon_theme_combo_box.get_active_id() @@ -705,7 +707,7 @@ class SettingsDialog: Gtk.Settings().get_default().set_property("gtk-theme-name", "") self.remove_theme(self._theme_combo_box, self._ext_settings.themes_path) - def on_icon_theme_changed(self, button, state=False): + def on_appearance_changed(self, button, state=False): if self._main_stack.get_visible_child_name() != "appearance": return self.show_info_message("Save and restart the program to apply the settings.", Gtk.MessageType.WARNING) @@ -778,6 +780,7 @@ class SettingsDialog: @run_idle def init_appearance(self): self._dark_mode_switch.set_active(self._ext_settings.dark_mode) + self._layout_switch.set_active(self._ext_settings.alternate_layout) t_support = self._ext_settings.is_themes_support self._themes_support_switch.set_active(t_support) if t_support: