Resizing a Gtk dialog using a vertical Splitter as its main element, and containing boxes will mess the layout when resizing.
Works as expected with the Qt subsystem.
PB 6.21 Beta 2 - Gtk dialog resizing mess the layout of splitter's chlidren.
Re: PB 6.21 Beta 2 - Gtk dialog resizing mess the layout of splitter's chlidren.
Please always post a small snippet showing the issue, thanks !
Re: PB 6.21 Beta 2 - Gtk dialog resizing mess the layout of splitter's chlidren.
EDIT : For some reason, if the dialog loses focus and is brought back into focus, the layout works... until you resize the Gtk dialog again.
Sorry, here is a simple code that shows the difference between Gtk & QT subsystems behavior :
Code: Select all
Global AppQuit.b
Enumeration
#MainWindowXML
EndEnumeration
Runtime Enumeration
#MainWindowDialog
#MainWindowVehicleList
#MainWindowSplitter
#MainWindowAddVehicle
#MainWindowEditVehicle
#MainWindowRemoveVehicle
#MainWindowDownloadPathString
#MainWindowDownloadPathButton
EndEnumeration
Global MainWindowXML.s = "<window id='#MainWindowDialog' name='MainWindow' text='OpenPU' minwidth='800px' minheight='600px' flags='#PB_Window_SystemMenu | #PB_Window_SizeGadget'>" + Chr(10) +
" <splitter id='#MainWindowSplitter' firstmin='300px' flags='#PB_Splitter_Vertical|#PB_Splitter_FirstFixed'>" + Chr(10) +
" <vbox expand='item:3'>" + Chr(10) +
" <text text='My Vehicles'/>" + Chr(10) +
" <hbox>" + Chr(10) +
" <button id='#MainWindowAddVehicle' text='Add'/>" + Chr(10) +
" <button id='#MainWindowEditVehicle' text='Edit'/>" + Chr(10) +
" <button id='#MainWindowRemoveVehicle' text='Remove'/>" + Chr(10) +
" </hbox>" + Chr(10) +
" <listview id='#MainWindowVehicleList' text='My Vehicles'/>" + Chr(10) +
" <text text='Download folder :'/>" + Chr(10) +
" <hbox expand='item:1'>" + Chr(10) +
" <string id='#MainWindowDownloadPathString' text='...' flags='#PB_String_ReadOnly'/>" + Chr(10) +
" <button id='#MainWindowDownloadPathButton' witdh='30px' text='...'/>" + Chr(10) +
" </hbox>" + Chr(10) +
" </vbox>" + Chr(10) +
" <vbox expand='item:3'>" + Chr(10) +
" <text text='Vehicle details'/>" + Chr(10) +
" <gridbox columns='2' colexpand='item:2'>" + Chr(10) +
" <text text='Text 1'/>" + Chr(10) +
" <string text='Text 2'/>" + Chr(10) +
" <text text='Text 3'/>" + Chr(10) +
" <string text='Text 4'/>" + Chr(10) +
" <text text='Text 5'/>" + Chr(10) +
" <string text='Text 6'/>" + Chr(10) +
" <text text='Text 7'/>" + Chr(10) +
" <string text='Text 8'/>" + Chr(10) +
" </gridbox>" + Chr(10) +
" <editor/>" + Chr(10) +
" </vbox>" + Chr(10) +
" </splitter>" + Chr(10) +
"</window>"
Procedure.l OpenMainWindow()
If ParseXML(#MainWindowXML, MainWindowXML) And XMLStatus(#MainWindowXML) = #PB_XML_Success
If CreateDialog(#MainWindowDialog) And OpenXMLDialog(#MainWindowDialog, #MainWindowXML, "MainWindow")
ProcedureReturn 1
Else
Debug "Could not create dialog : " + DialogError(#MainWindowDialog)
ProcedureReturn 0
EndIf
Else
Debug "XML Dialog Error : " + XMLError(#MainWindowXML) + " (Ligne: " + XMLErrorLine(#MainWindowXML) + " | Position : " + XMLErrorPosition(#MainWindowXML) + ")"
ProcedureReturn 0
EndIf
EndProcedure
If OpenMainWindow()
Repeat
Event.l = WaitWindowEvent()
Select EventWindow()
Case DialogWindow(#MainWindowDialog)
Select Event
Case #PB_Event_CloseWindow
AppQuit = 1
EndSelect
EndSelect
Until AppQuit = 1
EndIf
Last edited by Yann64 on Mon Mar 31, 2025 8:07 pm, edited 2 times in total.
Re: PB 6.21 Beta 2 - Gtk dialog resizing mess the layout of splitter's chlidren.
same issues with pb v6.03 and higher
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive