Xojo BevelButton Dark Mode

It looks like BevelButton doesn’t really support Dark Mode changes the way a regular button does.
So…

Are there system default colors to set TextColor and FillColor to match a Button?
I am filling the background using FillRect and will need to change the color manually, and also the text color.

Also, what if a person changes their color scheme?

Looks like I need to take into account Accent and Highlight colors too! Aye Carumba.

It does not
Hence why I wrote on to replace it

Whew! That’s a lot of work.

It’s been deprecated? What is Xojo suggesting as a replacement?

nothing

macOS doesnt use bevel button styles much any more

Apple, who are the ones that didn’t update it for dark mode, suggest you use almost anything else: https://developer.apple.com/design/human-interface-guidelines/macos/buttons/bevel-buttons/

I would recommend regular PushButton.

1 Like

Which is odd as NSButton has a beveled style
Its marked as “discouraged” though in Xcode
Screen Shot 2020-09-09 at 6.06.46 PM

I was creating a “connect” button that would also change color to show status and activity. Thinking about it further, maybe it’s not the best design, since people want to be able to color things as they like.
What’s a “standard” way of showing an “activity” indictor on a program in MacOS?

Little green circle that flickers or turns red? I want to show communication activity and connection status, just can’t think what a “normal” way on MacOS is to show that.

activity is often a progress wheel or something like that
it doesnt have to be that but thats one thought

if its a “connecting” kind of profess I’ve also seen one where the arrow moves from left to right as if data is moving

then when you have a successful connection it could be as simple as a green gumdrop for connected, orange for “issues”, red for disconnected

really might depend on space and other ui elements as to what makes the most sense

Went back to the push button and added a little LED indicator showing connection status.

Anyone know of an app that has a connection indicator of some sort? Not a connecting progress bar but an indicator showing when data is coming or going. I remember back in the day modem indicators in the task bar on Windows would flash when sending and receiving data.

Is anything like that used in a modern app? Maybe something that communicates with a piece of hardware via TCP?

Use a Push Button and set it’s style to be Shadowless Square.

The various control styles between Catalina and Big Sur are visible on this page.

https://www.ohanaware.com/blog/202030/Preparing-your-Xojo-made-Mac-App-for-macOS-Big-Sur.html

Apple have system icons for this.

https://developer.apple.com/documentation/appkit/nsimagenamestatusavailable?language=objc

But you will have to display/remove using code.

One I use is Apples Airport utility
Screen Shot 2020-09-10 at 9.55.35 PM
The indicator is green when connected
Yellow if there is some issue - depends on the state of the device
But doesnt blink to indicate data transfer since that isnt what it monitors

Thank you, Sam. I could just emulate with an Oval, (and be ok X-Plat) but that’s good to know what the “proper” indicator looks like.
BTW, is there an official page that shows all the icons that’s perhaps a little better than this one?

I’d like a pushbutton that toggles showing an on and off state, X-plat of course. What should I use in Xojo? Can a toolbar button be used in place of a pushbutton?

No. Apple took down their page showing you all the graphics and what they actually look like. I must admit the imagery was from like 10.5 or something, so rather than update it every year, they just decided that it’s not worth their time.

That page is missing the Toucybar icons, but that’s not saying much. I can whip up a wee application that’ll let you see 'em all.

If you look at the bevelbutton code you can easily and quickly whip up something like a label that does this and reacts to mouse clicks

Heck that bevel button code you can use and just do NOT assign a textual label and assign an icon for whatever state you want and it should draw it just fine
When its clicked flip the stat, assign a different icon and off you go

1 Like