Please compare x64 vs x86 also gtk2 vs gtk3 - the results are other
Code: Select all
;- Color Button -------------------------------------------------------------------------
Procedure color_button(button, x, y, width, height, text$, color.l)
Protected image=CreateImage(#PB_Any, width, height)
StartDrawing(ImageOutput(image))
DrawingFont(FontID(1))
Box(0, 0, width, height, color)
DrawingMode(#PB_2DDrawing_Transparent)
DrawText(width/2-TextWidth(text$)/2,height/2-TextHeight(text$)/2,text$,0)
StopDrawing()
ButtonImageGadget(button, x, y, width, height, ImageID(image))
EndProcedure
LoadFont(1, "Arial", 9)
OpenWindow(0, 0, 0, 370, 150, "Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ButtonGadget(1, 10, 10, 70, 40,"Test")
ButtonGadget(2, 10, 70, 70, 40,"Test")
color_button(3, 95, 10, 70, 40, "Test", $00FF)
color_button(4, 95, 70, 70, 40, "Test", $00FF)
StartDrawing(WindowOutput(0))
DrawingMode(#PB_2DDrawing_Outlined)
Box(10, 10, 168, 110, color)
Box(10, 10, 155, 100, color)
StopDrawing()
ButtonGadget(5, 190, 10, 70, 40,"Test")
ButtonGadget(6, 190, 70, 70, 40,"Test")
color_button(7, 275, 10, 70, 40, "Test", $00FF)
color_button(8, 275, 70, 70, 40, "Test", $00FF)
StartDrawing(WindowOutput(0))
DrawingMode(#PB_2DDrawing_Outlined)
Box(190, 10, 169, 110, color)
Box(190, 10, 155, 100, color)
StopDrawing()
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow


