Hello,
I'm trying to center the window on Windows 11 with a system with 2 monitors. The kivy window opens on the primary monitor, and I want to center it such that it takes up 90 percent of the screen.
I've tried a bunch of things, but the results are either wrong or only work on a single monitor system.
If I use the screen module, it centers the window across both screens so kivy doesn't seem to know the resolution of the screen or something.
So, at the start of my app I can call:
Window.maximize()
max_size = Window.system_size
this gives me 2560 by 1369
my resolution is 3840 by 2160 , 150 %
so, kivy is saying the screen size is 2560 by 1369, which is ok, if you multiply by 1.5 you get the screen resolution....
ok so I set the Window.left to max_size[0] * 0.1
and Window.top to max_size[1] * 0.1, and then
Window.size to ( max_size[0] * 0.8,max_size[1] * 0.8)
Stepping through the code this seems to work in the PyCharm debugger. But the next event loop the Window.left and Window.top are reset to what they were at startup.
What am I missing here?
Thanks