From 916bc821331b7f0ee392f935bf2109e5754fb060 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 13 Apr 2019 17:58:20 +0200 Subject: Specific detection of screensize for Gnome pre 3.22 --- qml/mageiawelcome.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index 8986333..e5aea47 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -47,10 +47,10 @@ class ConfList(QAbstractListModel): if desktop == 'Gnome Wayland': import gi gi.require_version('Gdk', '3.0') - from gi.repository.Gdk import Display + from gi.repository.Gdk import Screen # pre-3.22, otherwise deprecated - #factor = Gdk.Screen.get_default().get_monitor_scale_factor(0) - self.screen_factor = Display.get_default().get_monitor(0).get_scale_factor() + self.screen_factor = Gdk.Screen.get_default().get_monitor_scale_factor(0) + #self.screen_factor = Display.get_default().get_monitor(0).get_scale_factor() # Search active network connections net = QNetworkConfigurationManager() -- cgit v1.2.1