Skip to content

Commit 8575434

Browse files
committed
Always show the featured banner, regardless of window size.
We still default the window to a smaller size for low-res desktops, as not all window managers restrict window sizes rationally when their default height is larger than the display.
1 parent db2d66d commit 8575434

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

usr/lib/linuxmint/mintinstall/mintinstall.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,6 @@ def __init__(self):
629629
self.gui_ready = False
630630
self.start_time = time.time()
631631

632-
self.low_res = self.get_low_res_screen()
633-
634632
self.settings = Gio.Settings(schema_id="com.linuxmint.install")
635633
self.arch = platform.machine()
636634

@@ -797,7 +795,7 @@ def on_pkginfo_from_uri_complete(self, pkginfo, error=None):
797795
if pkginfo:
798796
self.show_package(pkginfo, self.PAGE_LANDING)
799797

800-
def get_low_res_screen(self):
798+
def set_default_window_size(self):
801799
display = Gdk.Display.get_default()
802800
pointer = display.get_default_seat().get_pointer()
803801

@@ -812,6 +810,7 @@ def get_low_res_screen(self):
812810
# app pixels, so hidpi will also be affected here regardless of device resolution.
813811
if height < 800:
814812
print("MintInstall: low resolution detected (%dpx height), limiting window height." % (height))
813+
self.main_window.set_default_size(800, 550)
815814
return True
816815

817816
return False
@@ -827,6 +826,7 @@ def create_window(self, starting_page):
827826
self.main_window = self.builder.get_object("main_window")
828827
self.main_window.set_title(_("Software Manager"))
829828
GLib.set_application_name(_("Software Manager"))
829+
self.set_default_window_size()
830830

831831
self.main_window.set_icon_name("mintinstall")
832832
self.main_window.connect("delete_event", self.close_application)
@@ -1097,14 +1097,6 @@ def load_banner(self):
10971097
# Get the main banner container
10981098
box = self.builder.get_object("box_banner")
10991099

1100-
if self.low_res:
1101-
box.hide()
1102-
1103-
# This overrides the glade 800x600 defaults. 300 is excessively small so the window works
1104-
# out its own minimum height.
1105-
self.main_window.set_default_size(800, 500)
1106-
return
1107-
11081100
# Clear existing content
11091101
for child in box.get_children():
11101102
child.destroy()
@@ -1330,16 +1322,10 @@ def on_arrow_clicked(self, button, banner_stack):
13301322
self.start_slideshow_timer()
13311323

13321324
def start_slideshow_timer(self):
1333-
if self.low_res:
1334-
return
1335-
13361325
self.stop_slideshow_timer()
13371326
self.banner_slideshow_timeout_id = GLib.timeout_add_seconds(5, self.on_slideshow_timeout)
13381327

13391328
def stop_slideshow_timer(self):
1340-
if self.low_res:
1341-
return
1342-
13431329
if self.banner_slideshow_timeout_id > 0:
13441330
GLib.source_remove(self.banner_slideshow_timeout_id)
13451331
self.banner_slideshow_timeout_id = 0

0 commit comments

Comments
 (0)