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
I live to help wx-kind
I live to help wx-kind
Posts: 174
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

How to detect the Mojave Dark Theme?

Post by rocrail » Sat Jan 19, 2019 11:34 am

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.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3352
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to detect the Mojave Dark Theme?

Post by ONEEYEMAN » Tue Jan 22, 2019 3:28 pm

Hi,
First google hit returns this.

Thank you.

User avatar
rocrail
I live to help wx-kind
I live to help wx-kind
Posts: 174
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: How to detect the Mojave Dark Theme?

Post by rocrail » Tue Jan 22, 2019 3:43 pm

Thanks,

but I'm looking for a wxWidgets API call, not native macOS.
Best regards,
Rob.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3352
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to detect the Mojave Dark Theme?

Post by ONEEYEMAN » Tue Jan 22, 2019 3:52 pm

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: 13870
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to detect the Mojave Dark Theme?

Post by doublemax » Tue Jan 22, 2019 4:42 pm

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