Skip to content

Commit 608d8b8

Browse files
committed
feat(steami_screen): make width and height parameters adaptive
1 parent f202f4e commit 608d8b8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/steami_screen/steami_screen/screen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class Screen:
4848
CHAR_W = 8 # framebuf built-in font width
4949
CHAR_H = 8 # framebuf built-in font height
5050

51-
def __init__(self, display, width=128, height=128):
51+
def __init__(self, display, width=None, height=None):
5252
self._d = display
53-
self.width = width
54-
self.height = height
53+
self.width = width or getattr(display, 'width', 128)
54+
self.height = height or getattr(display, 'height', 128)
5555

5656
# --- Adaptive properties ---
5757

0 commit comments

Comments
 (0)