def get_ydpi(self): ydpi = GTKXpraClient.get_ydpi(self) if ydpi > 0: return ydpi return Gdk.Screen.get_default().get_resolution()