diff --git a/qubes_config/new_qube/new_qube_app.py b/qubes_config/new_qube/new_qube_app.py index 52ca6687..72a7bf69 100644 --- a/qubes_config/new_qube/new_qube_app.py +++ b/qubes_config/new_qube/new_qube_app.py @@ -81,6 +81,20 @@ def do_activate(self, *args, **kwargs): self.perform_setup() assert self.main_window self.main_window.show() + if self.main_window.get_allocated_width() > \ + self.main_window.get_screen().get_width(): + width = int(self.main_window.get_screen().get_width() * 0.9) + else: + # try to have at least 1100 pixels + width = min(int(self.main_window.get_screen().get_width() * 0.9), + 800) + if self.main_window.get_allocated_height() > \ + self.main_window.get_screen().get_height() * 0.9: + height = int(self.main_window.get_screen().get_height() * 0.9) + else: + height = self.main_window.get_allocated_height() + self.main_window.resize(width, height) + self.hold() def perform_setup(self):