Recent

Author Topic: [Solved] ToggleButton checked state looks not nice  (Read 751 times)

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
[Solved] ToggleButton checked state looks not nice
« 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.
« Last Edit: November 23, 2019, 05:50:43 pm by Alextp »

winni

  • Hero Member
  • *****
  • Posts: 590
Re: ToggleButton checked state looks not nice
« Reply #1 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

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
Re: ToggleButton checked state looks not nice
« Reply #2 on: November 16, 2019, 07:37:23 pm »
Nope, I hoped to change usual look (so I don't need to change my app)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: ToggleButton checked state looks not nice
« Reply #3 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
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
Re: ToggleButton checked state looks not nice
« Reply #4 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)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: ToggleButton checked state looks not nice
« Reply #5 on: November 17, 2019, 03:37:52 am »
r62250

additional information here: https://wiki.freepascal.org/Cocoa_Internals/Buttons
« Last Edit: November 17, 2019, 03:51:10 am by skalogryz »
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
Re: ToggleButton checked state looks not nice
« Reply #6 on: November 17, 2019, 11:54:22 am »
Now my dialog looks very good, tkx.