Lazarus

Programming => Widgetset => Cocoa => Topic started by: AlexTP on November 07, 2019, 12:37:19 pm

Title: [Solved] ToggleButton checked state looks not nice
Post by: AlexTP on November 07, 2019, 12:37:19 pm
ToggleButton checked states looks like normal button, only with light blue font, so it is barely visible that it's checked.
Can you apply another look?
macOS 10.8.
Title: Re: ToggleButton checked state looks not nice
Post by: winni on November 07, 2019, 02:03:31 pm
There is an event onChange

With its help you can change
* The color of the ToggleBox (does not work in Windows)
* The color of the font
* The style of the font
* The name of the font
* The caption of the ToggleBox
* The size of the ToggleBox

Enough?

Winni
Title: Re: ToggleButton checked state looks not nice
Post by: AlexTP on November 16, 2019, 07:37:23 pm
Nope, I hoped to change usual look (so I don't need to change my app)
Title: Re: ToggleButton checked state looks not nice
Post by: skalogryz on November 16, 2019, 09:38:49 pm
macOS button look and feel is driven by two attributes:
Bezel and Type
I've created a project that demonstrates the all possible combinations of bezel and type.
Please identify the one you find proper for the toggle box to use.

The project is attached to this post, or can be received from the github:
https://github.com/skalogryz/lcltests/tree/master/cocoabuttonsmatrix
Title: Re: ToggleButton checked state looks not nice
Post by: AlexTP on November 16, 2019, 09:54:12 pm
Of course 2 buttons styles are OK for ToggleButton, they keep pressed state
- NSOnOffButton (1st..4th bezel style, all are ok)
- NSPushOnPushOffButton (1st..4th bezel style)
Title: Re: ToggleButton checked state looks not nice
Post by: skalogryz on November 17, 2019, 03:37:52 am
r62250

additional information here: https://wiki.freepascal.org/Cocoa_Internals/Buttons
Title: Re: ToggleButton checked state looks not nice
Post by: AlexTP on November 17, 2019, 11:54:22 am
Now my dialog looks very good, tkx.
TinyPortal © 2005-2018