X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e413198572959f013fc2537a3c8cc184c9ac820d..c37dd6dad7f53b8f5f4c4a8d6434c2851cd2b9e4:/src/osx/carbon/renderer.cpp diff --git a/src/osx/carbon/renderer.cpp b/src/osx/carbon/renderer.cpp index 1d8bbd4df7..49e9c18244 100644 --- a/src/osx/carbon/renderer.cpp +++ b/src/osx/carbon/renderer.cpp @@ -38,6 +38,7 @@ // check if we're currently in a paint event inline bool wxInPaintEvent(wxWindow* win, wxDC& dc) { + wxUnusedVar(dc); return ( win->MacGetCGContextRef() != NULL ); } @@ -351,7 +352,7 @@ wxRendererMac::DrawMacThemeButton(wxWindow *win, drawInfo.adornment = adornment; if (flags & wxCONTROL_FOCUSED) drawInfo.adornment |= kThemeAdornmentFocus; - + HIThemeDrawButton( &headerRect, &drawInfo, cgContext, kHIThemeOrientationNormal, &labelRect ); } } @@ -366,7 +367,7 @@ wxRendererMac::DrawCheckBox(wxWindow *win, flags |= wxCONTROL_SELECTED; int kind; - + if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)) kind = kThemeCheckBoxSmall; @@ -469,7 +470,7 @@ void wxRendererMac::DrawChoice(wxWindow* win, wxDC& dc, const wxRect& rect, int flags) { int kind; - + if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)) kind = kThemePopupButtonSmall; @@ -487,7 +488,7 @@ void wxRendererMac::DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags) { int kind; - + if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)) kind = kThemeComboBoxSmall; @@ -504,7 +505,7 @@ void wxRendererMac::DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags) { int kind; - + if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL)) kind = kThemeRadioButtonSmall; @@ -532,23 +533,13 @@ void wxRendererMac::DrawTextCtrl(wxWindow* win, wxDC& dc, dc.SetBrush( *wxWHITE_BRUSH ); dc.SetPen( *wxTRANSPARENT_PEN ); dc.DrawRectangle(rect); - + dc.SetBrush( *wxTRANSPARENT_BRUSH ); HIRect hiRect = CGRectMake( x, y, w, h ); if ( !wxInPaintEvent(win, dc) ) { - Rect r = - { - (short) hiRect.origin.y, (short) hiRect.origin.x, - (short) (hiRect.origin.y + hiRect.size.height), - (short) (hiRect.origin.x + hiRect.size.width) - }; - - RgnHandle updateRgn = NewRgn(); - RectRgn( updateRgn, &r ); - HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true ); - DisposeRgn( updateRgn ); + win->Refresh( &rect ); } else {