X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d6d86a68427294503e40baee75c8f5758745af2..76fa9e023cdc89c86f9d69c48410c29a69e49827:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 42db9247e5..d83f686fbf 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -121,7 +121,7 @@ WX_DEFINE_ARRAY_PTR(wxColWidthInfo *, ColWidthArray); // wxListItemData (internal) //----------------------------------------------------------------------------- -class WXDLLEXPORT wxListItemData +class wxListItemData { public: wxListItemData(wxListMainWindow *owner); @@ -191,7 +191,7 @@ protected: // wxListHeaderData (internal) //----------------------------------------------------------------------------- -class WXDLLEXPORT wxListHeaderData : public wxObject +class wxListHeaderData : public wxObject { public: wxListHeaderData(); @@ -372,7 +372,7 @@ WX_DEFINE_OBJARRAY(wxListLineDataArray) // wxListHeaderWindow (internal) //----------------------------------------------------------------------------- -class WXDLLEXPORT wxListHeaderWindow : public wxWindow +class wxListHeaderWindow : public wxWindow { protected: wxListMainWindow *m_owner; @@ -429,7 +429,7 @@ private: // wxListRenameTimer (internal) //----------------------------------------------------------------------------- -class WXDLLEXPORT wxListRenameTimer: public wxTimer +class wxListRenameTimer: public wxTimer { private: wxListMainWindow *m_owner; @@ -443,7 +443,7 @@ public: // wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing //----------------------------------------------------------------------------- -class WXDLLEXPORT wxListTextCtrlWrapper : public wxEvtHandler +class wxListTextCtrlWrapper : public wxEvtHandler { public: // NB: text must be a valid object but not Create()d yet @@ -1380,7 +1380,11 @@ bool wxListLineData::SetAttributes(wxDC *dc, // arithmetics on wxColour, unfortunately) wxColour colText; if ( highlighted ) +#ifdef __WXMAC__ + colText = *wxWHITE; +#else colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); +#endif else if ( attr && attr->HasTextColour() ) colText = attr->GetTextColour(); else @@ -2182,23 +2186,39 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, { Init(); + +#ifdef __WXMAC__ + // OS X sel item highlight color differs from text highlight color, which is + // what wxSYS_COLOUR_HIGHLIGHT returns. + RGBColor hilight; + GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &hilight); + m_highlightBrush = new wxBrush( wxColour(hilight.red, hilight.green, hilight.blue ), wxSOLID ); +#else m_highlightBrush = new wxBrush - ( + ( wxSystemSettings::GetColour ( wxSYS_COLOUR_HIGHLIGHT ), wxSOLID - ); + ); +#endif +#ifdef __WXMAC__ + // on Mac, this color also differs from the wxSYS_COLOUR_BTNSHADOW, enough to be noticable. + // I don't know if BTNSHADOW is appropriate in other contexts, so I'm just changing it here. + GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &hilight); + m_highlightUnfocusedBrush = new wxBrush( wxColour(hilight.red, hilight.green, hilight.blue ), wxSOLID ); +#else m_highlightUnfocusedBrush = new wxBrush - ( - wxSystemSettings::GetColour - ( - wxSYS_COLOUR_BTNSHADOW - ), - wxSOLID - ); + ( + wxSystemSettings::GetColour + ( + wxSYS_COLOUR_BTNSHADOW + ), + wxSOLID + ); +#endif SetScrollbars( 0, 0, 0, 0, 0, 0 );