Vertical mode (#480)

This commit is contained in:
Alfredo Monclus
2022-02-24 16:00:51 -03:00
committed by GitHub
parent 3c1110d730
commit dd027c0583
12 changed files with 274 additions and 90 deletions

View File

@@ -120,6 +120,10 @@ class KlipperScreen(Gtk.Window):
self.height = self._config.get_main_config().getint("height", monitor.get_geometry().height)
self.set_default_size(self.width, self.height)
self.set_resizable(False)
if self.width < self.height:
self.vertical_mode = True
else:
self.vertical_mode = False
logging.info("Screen resolution: %sx%s" % (self.width, self.height))
self.theme = self._config.get_main_config_option('theme')
self.show_cursor = self._config.get_main_config().getboolean("show_cursor", fallback=False)