Bugfixes, Smaller UI for displays with reduced resolution
This commit is contained in:
20
cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/display.py
Normal file
20
cinnamon-dynamic-wallpaper@TobiZog/5.4/scripts/display.py
Normal 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
|
||||
Reference in New Issue
Block a user