mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 00:14:09 -04:00
bitwidgets: Fix X11DisplayDevice dimensions to match LCD
This commit is contained in:
parent
11c85149c4
commit
73649c7244
@ -46,17 +46,17 @@ class X11DisplayDevice(DisplayDevice, threading.Thread):
|
||||
|
||||
points = []
|
||||
for x in range(0, 160):
|
||||
for y in range(0, 48):
|
||||
for y in range(0, 42):
|
||||
if image.getpixel((x, y)) == 1:
|
||||
points.append((x, y))
|
||||
|
||||
self._win.fill_rectangle(self._inversegc, 0, 0, 160, 48)
|
||||
self._win.fill_rectangle(self._inversegc, 0, 0, 160, 42)
|
||||
self._win.poly_point(self._gc, X.CoordModeOrigin, points)
|
||||
|
||||
def createWindow(self):
|
||||
self._screen = self._display.screen()
|
||||
self._win = self._screen.root.create_window(
|
||||
0, 0, 160, 48, 2,
|
||||
0, 0, 160, 42, 2,
|
||||
self._screen.root_depth,
|
||||
X.InputOutput,
|
||||
X.CopyFromParent,
|
||||
@ -75,7 +75,7 @@ class X11DisplayDevice(DisplayDevice, threading.Thread):
|
||||
self._win.set_wm_normal_hints(
|
||||
flags=(Xutil.PPosition | Xutil.PSize | Xutil.PMinSize),
|
||||
min_width=160,
|
||||
min_height=48)
|
||||
min_height=42)
|
||||
self._win.map()
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user