Skip to content

Commit

Permalink
Fix default window sizes for normal and low-resolution mode.
Browse files Browse the repository at this point in the history
- Slightly raise the threshold for low-res mode.
- Adjust sizes so that all three category rows will be visible
  during the initial window showing.
- Fix some small padding issues with section labels.
  • Loading branch information
mtwebster committed Jul 16, 2023
1 parent 1e8acac commit 2eb150c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions usr/lib/linuxmint/mintinstall/mintinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ def get_low_res_screen(self):

# If it's less than our threshold than consider us 'low res'. The workarea being used is in
# app pixels, so hidpi will also be affected here regardless of device resolution.
if height < 768:
if height < 800:
print("MintInstall: low resolution detected (%dpx height), limiting window height." % (height))
return True

Expand Down Expand Up @@ -1391,7 +1391,7 @@ def load_banner(self):

# This overrides the glade 800x600 defaults. 300 is excessively small so the window works
# out its own minimum height.
self.main_window.set_default_geometry(800, 300)
self.main_window.set_default_size(800, 500)
return

for child in box.get_children():
Expand Down
14 changes: 9 additions & 5 deletions usr/share/linuxmint/mintinstall/mintinstall.glade
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkSizeGroup"/>
Expand Down Expand Up @@ -78,7 +78,7 @@
<property name="can-focus">False</property>
<property name="window-position">center</property>
<property name="default-width">800</property>
<property name="default-height">650</property>
<property name="default-height">685</property>
<property name="gravity">center</property>
<child>
<object class="GtkBox" id="vbox4">
Expand Down Expand Up @@ -169,6 +169,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-right">10</property>
<property name="margin-bottom">8</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
Expand All @@ -189,8 +190,9 @@
<object class="GtkLabel" id="label_featured">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">2</property>
<property name="margin-bottom">6</property>
<property name="xpad">6</property>
<property name="ypad">12</property>
<property name="label" translatable="yes">Featured</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
Expand Down Expand Up @@ -237,8 +239,9 @@
<object class="GtkLabel" id="label_categories_landing">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="xpad">6</property>
<property name="ypad">12</property>
<property name="label" translatable="yes">Categories</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
Expand Down Expand Up @@ -285,8 +288,9 @@
<object class="GtkLabel" id="label_top_rated">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="xpad">6</property>
<property name="ypad">12</property>
<property name="label" translatable="yes">Top Rated</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
Expand Down

0 comments on commit 2eb150c

Please sign in to comment.