[Gambas-bugtracker] Bug #2144: Picture displayed at wrong Position/ outside of its Container
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Wed May 19 12:37:49 CEST 2021
http://gambaswiki.org/bugtracker/edit?object=BUG.2144&from=L21haW4-
Comment #15 by Claus DIETRICH:
>When you use Qt, the first y-positioning of the window fails if it is done outside of the Open event. With GTK+, it behaves correctly.
With QT4 it is also correct. Here it only happens with QT5.
>Anyway, you must be aware that for a window, X and Y are the position of its top-left corner decoration -included-, whereas W and H are the size of the window decoration -excluded-!
Yesterday I thought, that this is possibly one of the differences to Visual Basic. So I reconfirmed the bahaviour of Visual Basic and I could position the windows directly below each other (chick-to-chick) with the same commands (Form2.Top = Form1.top + Form1.Height). So if your statement is true, it would be impossible with Gambas to position windows exactly below each other (chick-to-chick) because of the unknown height of the decoration frame, but when you click on the lower button of my demo app, you will get the same result as in Visual Basic. Doesn't this mean that it includes the decoration frame? Tests with objects inside the form however confirm your statement. This is puzzling me and needs a further review.
>This is because there is no reliable way to know the size of the window decorations.
With VB I used the delta between the Desktop-Height and an invisible maximized test-window, which brought me close to it.
>I think the bug with y-positioning comes from the decoration being created a bit after the window is visible.
After I inserted a Wait right after the Form1.Show-command, the result with QT5 is correct. Why does Qt5 behaves differently compared to other frameworks including QT4?
More information about the Bugtracker
mailing list