X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a63feff3a93d9d9dc36f155d3a5c3a36cb922f0..7bdfb981a826d29e292738a27700543fa10d2bfb:/src/msw/listctrl.cpp?ds=sidebyside diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 693df7dc4f..2ea528e817 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -291,7 +291,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h") wxBEGIN_PROPERTIES_TABLE(wxListCtrl) wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) - wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxListCtrl) @@ -363,11 +363,6 @@ bool wxListCtrl::Create(wxWindow *parent, 0, LVS_EX_FULLROWSELECT); } - // inherit foreground colour but our background should be the same as for - // listboxes and other such "container" windows and not inherited - SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(GetParent()->GetForegroundColour()); - return TRUE; } @@ -546,6 +541,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag) // accessors // ---------------------------------------------------------------------------- +/* static */ wxVisualAttributes +wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +{ + wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant); + + // common controls have their own default font + attrs.font = wxGetCCDefaultFont(); + + return attrs; +} + // Sets the foreground, i.e. text, colour bool wxListCtrl::SetForegroundColour(const wxColour& col) {