slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.54k stars 600 forks source link

Windows 10 window resize and maximize wonky #554

Closed L0uisc closed 1 year ago

L0uisc commented 3 years ago

I don't know if it is related or similar, but I have the following issue with window resizing with the memory game tutorial:

sixtyFPS_bug

I cannot resize, but the window does not become invisible when I try.

The window does not get maximized when clicking the "maximize" button. Instead, it is resized to the screen size, but not positioned correctly. Part of the window is thus off-screen. When I then click Maximize again, it does get maximized. Restoring down then also works normally.

OS: Windows 10 sixtyFPS: 0.1.3 rustc: 1.54

Originally posted by @L0uisc in https://github.com/sixtyfpsui/sixtyfps/issues/553#issuecomment-937146128

L0uisc commented 3 years ago

I think your calculation of window size is wrong on Windows too. Shouldn't the right and bottom margins coincide with the tiles? I don't have access to the PC on which the code live, since I'm at work, but I can check if I made a typo when entering the main window size from your tutorial.

L0uisc commented 3 years ago

Ok no, your tutorial only leaves a rather large margin around the right and bottom of the tiles. I made the main window dimensions 286px and the tiles fit snugly as expected.

ogoffart commented 1 year ago

Fixed by https://github.com/slint-ui/slint/pull/642