1
Index: include/wx/mac/carbon/listctrl.h
2
===================================================================
3
--- include/wx/mac/carbon/listctrl.h (revision 51611)
4
+++ include/wx/mac/carbon/listctrl.h (working copy)
6
void MacSetDrawingContext(void* context) { m_cgContext = context; }
7
void* MacGetDrawingContext() { return m_cgContext; }
10
+#if wxABI_VERSION >= 20808
11
+ virtual wxVisualAttributes GetDefaultAttributes() const
13
+ return GetClassDefaultAttributes(GetWindowVariant());
16
+ static wxVisualAttributes
17
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
18
+#endif // wxABI_VERSION >= 20808
22
// protected overrides needed for pimpl approach
23
Index: src/mac/carbon/listctrl_mac.cpp
24
===================================================================
25
--- src/mac/carbon/listctrl_mac.cpp (revision 52040)
26
+++ src/mac/carbon/listctrl_mac.cpp (working copy)
28
(EventHandlerRef *)&m_macListCtrlEventHandler);
31
+ // set the default font to slightly smaller font that the native
32
+ // DataBrowser control uses:
34
+ font.MacCreateThemeFont(kThemeViewsFont);
45
+wxVisualAttributes wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
47
+ wxVisualAttributes attr;
49
+ attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
50
+ attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
51
+ attr.font.MacCreateThemeFont(kThemeViewsFont);
56
// ----------------------------------------------------------------------------
57
// set/get/change style
58
// ----------------------------------------------------------------------------
60
if (bgColor == wxNullColour)
61
bgColor = listBgColor;
63
- wxFont listFont = list->GetFont();
64
- if (font == wxNullFont)
67
+ font = list->GetFont();
69
wxMacCFStringHolder cfString;
70
cfString.Assign( text, wxLocale::GetSystemEncoding() );
75
- if (font.GetFamily() != wxFONTFAMILY_DEFAULT)
76
- info.fontID = font.MacGetThemeFontID();
77
+ info.fontID = font.MacGetThemeFontID();
79
::TextSize( (short)(font.MacGetFontSize()) ) ;
80
::TextFace( font.MacGetFontStyle() ) ;