added OnSysColourChanged() (modified patch 1103439)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,6 +69,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||||
|
|
||||||
virtual void DoGetClientSize(int *width, int *height) const;
|
virtual void DoGetClientSize(int *width, int *height) const;
|
||||||
virtual void DoSetClientSize(int width, int height);
|
virtual void DoSetClientSize(int width, int height);
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
||||||
EVT_SIZE(wxFrame::OnSize)
|
EVT_SIZE(wxFrame::OnSize)
|
||||||
|
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
||||||
@@ -57,9 +59,22 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
return wxTopLevelWindow::Create(parent, id, title, pos, size, style, name);
|
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Responds to colour changes, and passes event on to children.
|
||||||
|
void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||||
|
{
|
||||||
|
SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
|
||||||
|
Refresh();
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// menu support
|
// menu support
|
||||||
|
Reference in New Issue
Block a user