X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d497dca47560bb375902c2a261d819e7470a92b3..cc164686f3dc689732395f11210c5bb9a76b6ff2:/src/mac/dialog.cpp?ds=sidebyside diff --git a/src/mac/dialog.cpp b/src/mac/dialog.cpp index 1537065f54..959fe01dfd 100644 --- a/src/mac/dialog.cpp +++ b/src/mac/dialog.cpp @@ -30,7 +30,7 @@ extern wxList wxPendingDelete; #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) -BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow) +BEGIN_EVENT_TABLE(wxDialog, wxDialogBase) EVT_BUTTON(wxID_OK, wxDialog::OnOK) EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) @@ -47,7 +47,7 @@ END_EVENT_TABLE() wxDialog::wxDialog() { m_isShown = FALSE; - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); } bool wxDialog::Create(wxWindow *parent, wxWindowID id, @@ -58,7 +58,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, const wxString& name) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) @@ -66,7 +66,8 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) , name ) ; - m_macWindowData->m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; + m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; + SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; return TRUE; } @@ -216,7 +217,7 @@ void wxDialog::EndModal(int retCode) } // Standard buttons -void wxDialog::OnOK(wxCommandEvent& event) +void wxDialog::OnOK(wxCommandEvent& WXUNUSED(event)) { if ( Validate() && TransferDataFromWindow() ) { @@ -224,19 +225,19 @@ void wxDialog::OnOK(wxCommandEvent& event) } } -void wxDialog::OnApply(wxCommandEvent& event) +void wxDialog::OnApply(wxCommandEvent& WXUNUSED(event)) { if (Validate()) TransferDataFromWindow(); // TODO probably need to disable the Apply button until things change again } -void wxDialog::OnCancel(wxCommandEvent& event) +void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) { - EndModal(wxID_CANCEL); + EndModal(wxID_CANCEL); } -void wxDialog::OnCloseWindow(wxCloseEvent& event) +void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { // We'll send a Cancel message by default, // which may close the dialog. @@ -266,9 +267,9 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) closing.DeleteObject(this); } -void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) +void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); Refresh(); }