GTK3 Resizing nightmares, everything broken?

Linux specific forum
Justin
Addict
Addict
Posts: 956
Joined: Sat Apr 26, 2003 2:49 pm

GTK3 Resizing nightmares, everything broken?

Post by Justin »

It seems with gtk3 all resizing is broken, there is no more fixed sizes, gtk will autosize your gadgets. It also happens with containers, if you try this code no scrollbars should appear it just resizes to the window dimensions, it works perfect with gtk2 but everything is screwed with gtk3.
This is a huge problem, all the gadgets metrics are broken since PB uses the fixed panel wich is forbidden in gtk3.

Code: Select all

EnableExplicit

Global.i cont, win, cont2

Procedure sizeHandler()
	ResizeGadget(cont, 0, 0, WindowWidth(win), WindowHeight(win))
	ResizeGadget(cont2, #PB_Ignore, #PB_Ignore, #PB_Ignore, GadgetHeight(cont))


EndProcedure

OpenWindow(0, 0, 0, 200, 200, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
BindEvent(#PB_Event_SizeWindow, @sizeHandler())
cont = ContainerGadget(#PB_Any, 0, 0, 200, 200);, #PB_Container_Flat)
cont2 = ContainerGadget(#PB_Any, 100, 0, 80, 200);, #PB_Container_Flat)
SetGadgetColor(cont, #PB_Gadget_BackColor, RGB(255, 0, 0))
SetGadgetColor(cont2, #PB_Gadget_BackColor, RGB(0, 255, 0))

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow