added Get(Class)DefaultAttributes implementation for all controls using DataBrowser native control; fixed wxListBox's to return correct font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -577,6 +577,14 @@ public:
|
||||
this->m_Deleting = deleting;
|
||||
}
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// inherited methods from wxDataViewCtrlBase:
|
||||
virtual void DoSetExpanderColumn(void);
|
||||
|
@@ -361,6 +361,14 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
void MacSetDrawingContext(void* context) { m_cgContext = context; }
|
||||
void* MacGetDrawingContext() { return m_cgContext; }
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
|
||||
// protected overrides needed for pimpl approach
|
||||
|
@@ -997,6 +997,18 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||
return true;
|
||||
} /* wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator) */
|
||||
|
||||
/*static*/
|
||||
wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
|
||||
{
|
||||
wxVisualAttributes attr;
|
||||
|
||||
attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||
attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX );
|
||||
attr.font.MacCreateFromThemeFont(kThemeViewsFont);
|
||||
|
||||
return attr;
|
||||
}
|
||||
|
||||
bool wxDataViewCtrl::AssociateModel(wxDataViewModel* model)
|
||||
{
|
||||
if (!wxDataViewCtrlBase::AssociateModel(model))
|
||||
|
@@ -269,7 +269,7 @@ wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||
|
||||
attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||
attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX );
|
||||
attr.font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
||||
attr.font.MacCreateFromThemeFont(kThemeViewsFont);
|
||||
|
||||
return attr;
|
||||
}
|
||||
|
@@ -772,6 +772,18 @@ wxListCtrl::~wxListCtrl()
|
||||
delete m_renameTimer;
|
||||
}
|
||||
|
||||
/*static*/
|
||||
wxVisualAttributes wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
|
||||
{
|
||||
wxVisualAttributes attr;
|
||||
|
||||
attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||
attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX );
|
||||
attr.font.MacCreateFromThemeFont(kThemeViewsFont);
|
||||
|
||||
return attr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// set/get/change style
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user