Supporting Appearance Mode change under macOS 10.14
The system color functions depend on the current appearance, this is not automatically set to the effective appearance (that can be changed during runtime via the system preferences), added a helper class to make sure the correct version is used for retrieval.
This commit is contained in:
@@ -505,6 +505,18 @@ extern NSLayoutManager* gNSLayoutManager;
|
||||
wxString wxStringWithNSString(NSString *nsstring);
|
||||
NSString* wxNSStringWithWxString(const wxString &wxstring);
|
||||
|
||||
// helper class for setting the current appearance to the
|
||||
// effective appearance and restore when exiting scope
|
||||
|
||||
class WXDLLIMPEXP_CORE wxOSXEffectiveAppearanceSetter
|
||||
{
|
||||
public:
|
||||
wxOSXEffectiveAppearanceSetter();
|
||||
~wxOSXEffectiveAppearanceSetter();
|
||||
private:
|
||||
void * formerAppearance;
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user