You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And this is fired for for multiple steps of this "animation".
OnWindowSize then is resulting in calls to "rethink()" which itself does the gtk_window_resize we used to "init" the resize already.
Maybe a resizeable window just does not need the "rethink"-content (resizing to some calculated height).
Maybe this was just added for resizeable windows to "fit" to the content "automagically"
Maybe it is already enough to call "layoutKids()" instead of resizing a window when the event happens.
Function OnWindowSize(widget:Byte Ptr, obj:Object)
Local win:TGTKWindow = TGTKWindow(obj)
If win Then
If win.ClientHeight() <> win.oldCH Or win.ClientWidth() <> win.oldCW Then
win.oldCH = win.ClientHeight()
win.oldCW = win.ClientWidth()
'here ... maybe just TGTKWindow(obj).LayoutKids() would do?
TGTKContainer(obj).rethink()
End If
End If
End Function
While thinkering with some issues I spotted something interesting:
This example here (from createbutton.bmx):
On a click on one of the buttons the window will resize.
But when doing this in a default Ubuntu 23.10 installation this resizes the window way bigger..
I then added some debug prints to the "Method rethink" of the TGTKWindow type
Mint 22 (working nicely):
But on Ubuntu 23 this is printed:
So wait ... Ubuntu has these nice animations when changing things ... so resizing "swishes" into the new size.
in
initWindow()
gtkgadget.bmx contains this:And this is fired for for multiple steps of this "animation".
OnWindowSize then is resulting in calls to "rethink()" which itself does the
gtk_window_resize
we used to "init" the resize already.Disabling the animation (settings -> accessibility -> reduce animations) makes it work correct again.
The text was updated successfully, but these errors were encountered: