How to detect the Mojave Dark Theme?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

How to detect the Mojave Dark Theme?

Post by rocrail »

Hi,

since the 3.1.2 supports the Mojave Dark Theme, I also want to trigger some modification my self.
How can I check wxWidgets if the Dark Theme is active?
Best regards,
Rob.
https://wiki.rocrail.net
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to detect the Mojave Dark Theme?

Post by ONEEYEMAN »

Hi,
First google hit returns this.

Thank you.
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: How to detect the Mojave Dark Theme?

Post by rocrail »

Thanks,

but I'm looking for a wxWidgets API call, not native macOS.
Best regards,
Rob.
https://wiki.rocrail.net
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to detect the Mojave Dark Theme?

Post by ONEEYEMAN »

Hi,
I doubt its there.
You can submit a PR with the appropriate function from the post I referenced and then use it with appropriate conditional...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to detect the Mojave Dark Theme?

Post by doublemax »

You could try and check some system colors with wxSystemSettings::GetColour(...)
Maybe they return a unique color or color combination in that case.

But even if it works, it won't be as reliable as the native call.
Use the source, Luke!
Post Reply