Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Next] Unify scrollbar positioning #447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 43 additions & 24 deletions resources/mintinstall.glade
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@
<object class="GtkBox" id="box_landing">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<property name="margin-end">8</property>
<property name="margin-top">8</property>
<property name="margin-bottom">8</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
Expand All @@ -280,13 +276,16 @@
<object class="GtkBox" id="scroll_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">9</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box_banner">
<property name="height-request">160</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-right">10</property>
<property name="margin-start">3</property>
<property name="margin-end">3</property>
<property name="margin-top">3</property>
<property name="margin-bottom">8</property>
<property name="orientation">vertical</property>
<child>
Expand Down Expand Up @@ -329,7 +328,6 @@
<object class="GtkBox" id="box_featured">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-right">10</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -378,7 +376,6 @@
<object class="GtkBox" id="box_categories">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-right">10</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -427,7 +424,6 @@
<object class="GtkBox" id="box_top_rated">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-right">10</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -474,23 +470,43 @@
<object class="GtkBox" id="box_list">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<property name="margin-end">8</property>
<property name="margin-bottom">8</property>
<property name="orientation">vertical</property>
<property name="baseline-position">top</property>
<child>
<object class="GtkLabel" id="label_cat_name">
<object class="GtkBox" id="box_cat_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xpad">6</property>
<property name="ypad">12</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
</attributes>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label_cat_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xpad">12</property>
<property name="ypad">12</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -516,6 +532,7 @@
<object class="GtkBox" id="box_cat_page">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">9</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
Expand Down Expand Up @@ -578,22 +595,24 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_subcategories">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="margin-start">9</property>
<property name="margin-end">9</property>
<property name="margin-bottom">9</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
</object>
Expand Down Expand Up @@ -1039,7 +1058,7 @@
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="border-width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
Expand Down
12 changes: 9 additions & 3 deletions usr/lib/linuxmint/mintinstall/mintinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -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):
Expand All @@ -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)
Expand All @@ -2326,7 +2331,8 @@ def show_search_results(self, terms):
listing = self.installer.cache.values()
self.current_category = None

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:
Expand Down