Give wxListBox a GetClassDefaultAttributes so wxCalendarCtrl (and
others) can use the right set of attributes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,6 +125,10 @@ public:
|
|||||||
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
|
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
|
|
||||||
|
|
||||||
|
static wxVisualAttributes
|
||||||
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
// Windows callbacks
|
// Windows callbacks
|
||||||
#if !__WXMAC_OSX__
|
#if !__WXMAC_OSX__
|
||||||
void OnChar(wxKeyEvent& event);
|
void OnChar(wxKeyEvent& event);
|
||||||
|
@@ -622,6 +622,18 @@ wxOwnerDrawn *wxListBox::CreateItem(size_t n)
|
|||||||
|
|
||||||
#endif //USE_OWNER_DRAWN
|
#endif //USE_OWNER_DRAWN
|
||||||
|
|
||||||
|
|
||||||
|
// Some custom controls depend on this
|
||||||
|
/* static */ wxVisualAttributes
|
||||||
|
wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
|
{
|
||||||
|
wxVisualAttributes attr;
|
||||||
|
attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
||||||
|
attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX);
|
||||||
|
attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
|
return attr;
|
||||||
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// list box control implementation
|
// list box control implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
Reference in New Issue
Block a user