Handle wxEVT_SYS_COLOUR_CHANGED in wxAUI classes

Update the colours used when the system theme changes.

This is especially important to use the colour scheme compatible with
macOS 10.14+ dark mode.

Note that this commit is best viewed with "git diff --color-moved".

Closes https://github.com/wxWidgets/wxWidgets/pull/916
This commit is contained in:
Daniel Kulp
2018-11-01 11:02:30 -04:00
committed by Vadim Zeitlin
parent 974b7c0990
commit 727a100a6a
11 changed files with 161 additions and 76 deletions

View File

@@ -76,6 +76,9 @@ public:
int buttonState,
const wxRect& rect,
wxAuiPaneInfo& pane) = 0;
// Provide opportunity for subclasses to recalculate colours
virtual void UpdateColoursFromSystem() {}
};
@@ -136,6 +139,9 @@ public:
wxAuiPaneInfo& pane);
#endif
virtual void UpdateColoursFromSystem() wxOVERRIDE;
protected:
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);