Use more debug-friendly geometry & Print geometry
This commit is contained in:
parent
c750ace2f0
commit
da721d13f4
|
@ -40,9 +40,17 @@ class TestWin(Gtk.Window):
|
|||
|
||||
def make_fullscreen(self):
|
||||
geo = self.get_screen_size(self._default_monitor)
|
||||
self.move(geo.x, geo.y)
|
||||
self.resize(geo.width, geo.height)
|
||||
|
||||
scale = (1.05, 6)
|
||||
x, y, w, h = (
|
||||
geo.x + geo.width / 2 - geo.width / scale[0] / 2,
|
||||
geo.y,
|
||||
geo.width / scale[0],
|
||||
geo.height / scale[1],
|
||||
)
|
||||
self.move(x, y)
|
||||
self.resize(w, h)
|
||||
print(f"geometry: @{x:.0f},{y:.0f} {w:.0f}x{h:.0f}")
|
||||
|
||||
def get_screen_size(self, monitor):
|
||||
return self.get_screen().get_monitor_geometry(monitor)
|
||||
|
||||
|
|
Loading…
Reference in New Issue