Strange behavior with button gadget

Mac OSX specific forum
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 528
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Strange behavior with button gadget

Post by Mindphazer »

I have noticed something strange with ButtonGadget : in the code below, both gadgetbuttons have the same width (60). One is 25 height, and the other one have 20 height.

Code: Select all

If OpenWindow(#PB_Any, 0, 0, 200, 150, "Test", #PB_Window_SystemMenu | #PB_Window_WindowCentered)
  Button_25 = ButtonGadget(#PB_Any, 50, 50, 60, 25, "...")
  Button_20 = ButtonGadget(#PB_Any, 50, 80, 60, 20, "...")
EndIf
Repeat
  Event  = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
Once they are drawn, they don't seem to have the same width :

Image

If someone can explain, i would be delighted !!
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 26.1 - Iphone 17 Pro Max - iPad at home
...and unfortunately... Windows at work...
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Strange behavior with button gadget

Post by Polo »

I've noticed the width of the 25px height buttons looks incorrect too.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Strange behavior with button gadget

Post by wilbert »

The 25px height button has a different bezel style.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 528
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Strange behavior with button gadget

Post by Mindphazer »

wilbert wrote:The 25px height button has a different bezel style.
Right.
It looks like cocoa button style.
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 26.1 - Iphone 17 Pro Max - iPad at home
...and unfortunately... Windows at work...
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Strange behavior with button gadget

Post by wilbert »

Mindphazer wrote:It looks like cocoa button style.
That's correct.
Fred explains it here ...
http://www.purebasic.fr/english/viewtop ... 24&t=51193
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 528
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Strange behavior with button gadget

Post by Mindphazer »

I understand.
Thank you wilbert
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 26.1 - Iphone 17 Pro Max - iPad at home
...and unfortunately... Windows at work...
Post Reply