X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..e53b3d16de127872e39bf276f7e616b32f161645:/src/osx/carbon/renderer.cpp diff --git a/src/osx/carbon/renderer.cpp b/src/osx/carbon/renderer.cpp index abcc1d6aa2..c693596282 100644 --- a/src/osx/carbon/renderer.cpp +++ b/src/osx/carbon/renderer.cpp @@ -27,7 +27,7 @@ #include "wx/renderer.h" #include "wx/graphics.h" -#include "wx/mac/uma.h" +#include "wx/osx/private.h" class WXDLLEXPORT wxRendererMac : public wxDelegateRendererNative @@ -62,6 +62,8 @@ public: const wxRect& rect, int flags = 0); + virtual wxSize GetCheckBoxSize(wxWindow* win); + virtual void DrawComboBoxDropButton(wxWindow *win, wxDC& dc, const wxRect& rect, @@ -236,7 +238,7 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win, wxOrientation orient, int WXUNUSED(flags) ) { - bool hasMetal = win->MacGetTopLevelWindow()->MacGetMetalAppearance(); + bool hasMetal = win->MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL; SInt32 height; GetThemeMetric( kThemeMetricSmallPaneSplitterHeight, &height ); HIRect splitterRect; @@ -344,6 +346,27 @@ wxRendererMac::DrawCheckBox(wxWindow *win, kThemeCheckBox, kThemeAdornmentNone); } +wxSize wxRendererMac::GetCheckBoxSize(wxWindow* WXUNUSED(win)) +{ + wxSize size; + SInt32 width, height; + OSStatus errStatus; + + errStatus = GetThemeMetric(kThemeMetricCheckBoxWidth, &width); + if (errStatus == noErr) + { + size.SetWidth(width); + } + + errStatus = GetThemeMetric(kThemeMetricCheckBoxHeight, &height); + if (errStatus == noErr) + { + size.SetHeight(height); + } + + return size; +} + void wxRendererMac::DrawComboBoxDropButton(wxWindow *win, wxDC& dc, @@ -405,4 +428,3 @@ wxRendererMac::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int fl HIThemeDrawFocusRect( &cgrect , true , cgContext , kHIThemeOrientationNormal ) ; } -