Bugfixes, Smaller UI for displays with reduced resolution

This commit is contained in:
2024-01-23 18:11:13 +01:00
parent f9a84b18e8
commit 8a58e66c20
5 changed files with 331 additions and 251 deletions

View File

@@ -0,0 +1,20 @@
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gdk
class Display:
""" Handling display informations and actions
"""
def __init__(self) -> None:
self.display = Gdk.Display.get_default()
def get_screen_height(self) -> int:
""" Estimate the height resolution of the primary display
Returns:
int: Height in pixel
"""
geometry = self.display.get_monitor(0).get_geometry()
return geometry.height