Add system colour change handler to wxSashWindow

Closes #26638.
This commit is contained in:
Steve Cornett
2026-06-27 19:47:51 +02:00
committed by Vadim Zeitlin
parent 70e467e9ae
commit fc2755524f
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -157,6 +157,7 @@ public:
private:
void Init();
void OnSysColourChanged(wxSysColourChangedEvent& event);
wxSashEdge m_sashes[4];
int m_dragMode;
+7 -1
View File
@@ -38,6 +38,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxSashEvent, wxCommandEvent);
wxBEGIN_EVENT_TABLE(wxSashWindow, wxWindow)
EVT_PAINT(wxSashWindow::OnPaint)
EVT_SIZE(wxSashWindow::OnSize)
EVT_SYS_COLOUR_CHANGED(wxSashWindow::OnSysColourChanged)
EVT_MOUSE_EVENTS(wxSashWindow::OnMouseEvent)
#if defined( __WXMSW__ ) || defined( __WXMAC__)
EVT_SET_CURSOR(wxSashWindow::OnSetCursor)
@@ -76,7 +77,6 @@ void wxSashWindow::Init()
m_mouseCaptured = false;
m_currentCursor = nullptr;
// Eventually, we'll respond to colour change messages
InitColours();
}
@@ -359,6 +359,12 @@ void wxSashWindow::OnSize(wxSizeEvent& WXUNUSED(event))
SizeWindows();
}
void wxSashWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
{
InitColours();
event.Skip();
}
wxSashEdgePosition wxSashWindow::SashHitTest(int x, int y, int WXUNUSED(tolerance))
{
int cx, cy;