SB changes gadget X/Y coordinates when size gets smaller
Posted: Sat Sep 26, 2020 11:51 am
If a gadget becomes so small that its text does not fit into the gedget, SpiderBasic also changes the X,Y coordinates of the gadget, although these values are not touched during a resize.
In PureBasic this phenomenon does not occur.
------------ 
SpiderBasic vs. PureBasic
This snippet demostrates the bug:
Sorry for the nitpicking at my last bug reports, but I'm currently working on a x-platform pixel-perfect layout engine and these bugs are exactly the kind of things I notice.
Markus
In PureBasic this phenomenon does not occur.
------------ 
SpiderBasic vs. PureBasic
This snippet demostrates the bug:
Code: Select all
Procedure WindowSized()
ResizeGadget(1, #PB_Ignore, #PB_Ignore, #PB_Ignore, WindowHeight(0) - 60)
EndProcedure
If OpenWindow(0, 0, 0, 320, 270, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
ButtonGadget(0, 10, 10, 300, 38, ".")
ButtonGadget(1, 10, 50, 300, 210, "This is a Button")
BindEvent(#PB_Event_SizeWindow, @WindowSized())
CompilerIf #PB_Compiler_OS <> #PB_OS_Web
; In PureBasic we need an event loop
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
CompilerEndIf
EndIfMarkus