X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a33446c8e71292bfdb960ed7e26e1f196938cf0..dd177170f656eab1cef5fffa72cf4c33c98db265:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 64e615f681..d16901dee4 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -59,49 +59,49 @@ static const int NO_IMAGE = -1; // Aqua arrows // ---------------------------------------------------------------------------- - /* XPM */ - static char *aqua_arrow_right[] = { - /* columns rows colors chars-per-pixel */ - "13 11 4 1", - " c None", - "b c #C0C0C0", - "c c #707070", - "d c #A0A0A0", - /* pixels */ - " b ", - " ddb ", - " cccdb ", - " cccccd ", - " ccccccdb ", - " ccccccccd", - " ccccccdb ", - " cccccb ", - " cccdb ", - " ddb ", - " b " - }; - - /* XPM */ - static char *aqua_arrow_down[] = { - /* columns rows colors chars-per-pixel */ - "13 11 4 1", - " c None", - "b c #C0C0C0", - "c c #707070", - "d c #A0A0A0", - /* pixels */ - " ", - " ", - " bdcccccccdb ", - " dcccccccd ", - " bcccccccb ", - " dcccccd ", - " bcccccb ", - " bcccd ", - " dcd ", - " bcb ", - " d " - }; +/* XPM */ +static const char *aqua_arrow_right[] = { +/* columns rows colors chars-per-pixel */ +"13 11 4 1", +" c None", +"b c #C0C0C0", +"c c #707070", +"d c #A0A0A0", +/* pixels */ +" b ", +" ddb ", +" cccdb ", +" cccccd ", +" ccccccdb ", +" ccccccccd", +" ccccccdb ", +" cccccb ", +" cccdb ", +" ddb ", +" b " +}; + +/* XPM */ +static const char *aqua_arrow_down[] = { +/* columns rows colors chars-per-pixel */ +"13 11 4 1", +" c None", +"b c #C0C0C0", +"c c #707070", +"d c #A0A0A0", +/* pixels */ +" ", +" ", +" bdcccccccdb ", +" dcccccccd ", +" bcccccccb ", +" dcccccd ", +" bcccccb ", +" bcccd ", +" dcd ", +" bcb ", +" d " +}; // ----------------------------------------------------------------------------- // private classes @@ -669,7 +669,7 @@ void wxGenericTreeCtrl::Init() m_hilightBrush = new wxBrush ( - wxSystemSettings::GetSystemColour + wxSystemSettings::GetColour ( wxSYS_COLOUR_HIGHLIGHT ), @@ -678,7 +678,7 @@ void wxGenericTreeCtrl::Init() m_hilightUnfocusedBrush = new wxBrush ( - wxSystemSettings::GetSystemColour + wxSystemSettings::GetColour ( wxSYS_COLOUR_BTNSHADOW ), @@ -697,7 +697,7 @@ void wxGenericTreeCtrl::Init() m_renameTimer = new wxTreeRenameTimer( this ); m_lastOnSame = FALSE; - m_normalFont = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ); + m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); m_boldFont = wxFont( m_normalFont.GetPointSize(), m_normalFont.GetFamily(), m_normalFont.GetStyle(), @@ -754,7 +754,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent, SetValidator( validator ); #endif - SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_LISTBOX ) ); + SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ) ); // m_dottedPen = wxPen( "grey", 0, wxDOT ); too slow under XFree86 m_dottedPen = wxPen( wxT("grey"), 0, 0 ); @@ -1201,6 +1201,11 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text, m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, image, selImage, data); + if ( data != NULL ) + { + data->m_pItem = (long) m_anchor; + } + if (HasFlag(wxTR_HIDE_ROOT)) { // if root is hidden, make sure we can navigate @@ -1208,10 +1213,6 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text, m_anchor->SetHasPlus(); Expand(m_anchor); } - if ( data != NULL ) - { - data->m_pItem = (long) m_anchor; - } if (!HasFlag(wxTR_MULTIPLE)) { @@ -2052,7 +2053,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level wxColour colText; if ( item->IsSelected() ) { - colText = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); } else { @@ -2060,7 +2061,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level if (attr && attr->HasTextColour()) colText = attr->GetTextColour(); else - colText = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT); + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); } // prepare to draw