From ebf0e681e7e7ef12c5b392d8d42ea1ee757901d2 Mon Sep 17 00:00:00 2001 From: Lorenz Gillner Date: Sun, 29 Dec 2024 17:42:42 +0100 Subject: [PATCH 1/2] Unify scrollbar positioning --- resources/mintinstall.glade | 67 +++++++++++++------- usr/lib/linuxmint/mintinstall/mintinstall.py | 14 +++- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/resources/mintinstall.glade b/resources/mintinstall.glade index 0f6a03f..66c89b7 100644 --- a/resources/mintinstall.glade +++ b/resources/mintinstall.glade @@ -253,10 +253,6 @@ True False - 8 - 8 - 8 - 8 vertical 6 @@ -280,13 +276,16 @@ True False + 9 vertical 160 True False - 10 + 3 + 3 + 3 8 vertical @@ -329,7 +328,6 @@ True False - 10 vertical @@ -378,7 +376,6 @@ True False - 10 vertical @@ -427,7 +424,6 @@ True False - 10 vertical @@ -474,23 +470,43 @@ True False - 8 - 8 - 8 vertical top - + True False - 6 - 12 - 0 - 0 - - - - + vertical + + + True + False + 12 + 12 + 0 + 0 + + + + + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + False @@ -516,6 +532,7 @@ True False + 9 vertical @@ -578,14 +595,16 @@ True True - 2 + 1 True False - 5 + 9 + 9 + 9 @@ -593,7 +612,7 @@ False True - 3 + 2 @@ -1039,7 +1058,7 @@ True False - 6 + 12 vertical 4 diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index e730552..862965f 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -2248,6 +2248,7 @@ def go_back_action(self): def show_category(self, category): self.current_pkginfo = None + cat_box = self.builder.get_object("box_cat_label") label = self.builder.get_object("label_cat_name") self.current_category = category @@ -2257,13 +2258,15 @@ def show_category(self, category): self.back_button.set_sensitive(True) label.set_text(self.current_category.name) - label.show() if category.parent: self.show_subcategories(category.parent) else: self.show_subcategories(category) + label.show() + cat_box.show() + self.show_packages(category.pkginfos, from_search=False) self.update_conditional_widgets() @@ -2285,6 +2288,8 @@ def show_subcategories(self, category): child = SubcategoryFlowboxChild(cat, is_all=False, active=self.current_category == cat) self.subcat_flowbox.add(child) + subcat_box = self.builder.get_object("box_subcategories") + subcat_box.show() self.subcat_flowbox.show_all() def on_subcategory_selected(self, flowbox, child, data=None): @@ -2308,7 +2313,7 @@ def show_search_results(self, terms): if not self.gui_ready: return False - label = self.builder.get_object("label_cat_name") + label = self.builder.get_object("box_cat_label") label.hide() XApp.set_window_progress(self.main_window, 0) @@ -2326,7 +2331,10 @@ def show_search_results(self, terms): listing = self.installer.cache.values() self.current_category = None - self.subcat_flowbox.hide() + # don't just hide the flowbox, but also its parent + # self.subcat_flowbox.hide() + subcat_box = self.builder.get_object("box_subcategories") + subcat_box.hide() self.back_button.set_sensitive(True) self.previous_page = self.PAGE_LANDING if self.page_stack.get_visible_child_name() != self.PAGE_SEARCHING: From fb5d81df8fd95a23c6e8c151e7b4268d7ce4e6cc Mon Sep 17 00:00:00 2001 From: Lorenz Gillner Date: Mon, 30 Dec 2024 16:49:25 +0100 Subject: [PATCH 2/2] Remove comments --- usr/lib/linuxmint/mintinstall/mintinstall.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index 862965f..5fdbc54 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -2331,8 +2331,6 @@ def show_search_results(self, terms): listing = self.installer.cache.values() self.current_category = None - # don't just hide the flowbox, but also its parent - # self.subcat_flowbox.hide() subcat_box = self.builder.get_object("box_subcategories") subcat_box.hide() self.back_button.set_sensitive(True)