zeal icon indicating copy to clipboard operation
zeal copied to clipboard

Window position is wrongly stored and restored

Open ajwsert opened this issue 5 years ago • 4 comments

When reopening the window shows up a few pixels below where it was when was last closed. E.g. after opening, resize and position it around 100 pixels from top of screen and then close. After reopening, the window has the same size but the top position is around at 150 pixels from top of screen (values are merely an example, I didn't measure the proper values). This way, if it starts around near the top of screen, after reopening it a couple of times it will show up around the middle to the bottom of screen. I cleaned the window_geometry value in the .ini but the issue still happens.

ajwsert avatar Sep 04 '19 17:09 ajwsert

What are your OS and Zeal versions?

trollixx avatar Sep 05 '19 03:09 trollixx

Oh sorry, my bad, I forgot to mention that. Windows 7 64 bits SP1, latest version of zeal (0.6.1).

ajwsert avatar Sep 05 '19 23:09 ajwsert

I was able to reproduce the bug, the window always appears precisely one title bar height below its previous position.

As part of the solution for #1084, Zeal will no longer use Qt's saveGeometry() and restoreGeometry() functionality, that should solve this issue as well.

trollixx avatar Oct 18 '19 03:10 trollixx

I have an issue with restoring Zeal window position and geometry. The window does not restore position, nor does it restore geometry if it was closed from the maximized state.

In Qt you can use QMainWindow restoreGeometry and restoreState methods: https://doc.qt.io/qt-6/restoring-geometry.html

espdev avatar Dec 26 '23 20:12 espdev