X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/569bb120c470125e8c1229d6f9c1029c252524b5..8946ede10c2702c7acbb194fe8bd2793d7fb8358:/src/generic/listctrl.cpp?ds=sidebyside diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 9d6d3c50e8..bf9e05c417 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -618,7 +618,7 @@ public: void OnPaint( wxPaintEvent &event ); void OnChildFocus(wxChildFocusEvent& event); - + void DrawImage( int index, wxDC *dc, int x, int y ); void GetImageSize( int index, int &width, int &height ) const; int GetTextLength( const wxString &s ) const; @@ -4881,12 +4881,7 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data ) void wxListMainWindow::OnScroll(wxScrollWinEvent& event) { - // FIXME -#if ( defined(__WXGTK__) || defined(__WXMAC__) ) && !defined(__WXUNIVERSAL__) - wxScrolledCanvas::OnScroll(event); -#else HandleOnScroll( event ); -#endif // update our idea of which lines are shown when we redraw the window the // next time @@ -5045,10 +5040,9 @@ bool wxGenericListCtrl::Create(wxWindow *parent, m_headerHeight = 0; - if ( !(style & wxLC_MASK_TYPE) ) - { - style = style | wxLC_LIST; - } + // just like in other ports, an assert will fail if the user doesn't give any type style: + wxASSERT_MSG( (style & wxLC_MASK_TYPE), + _T("wxListCtrl style should have exactly one mode bit set") ); if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) return false; @@ -5769,7 +5763,7 @@ wxGenericListCtrl::GetClassDefaultAttributes(wxWindowVariant variant) #else wxUnusedVar(variant); wxVisualAttributes attr; - attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT); attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX); attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); return attr;