X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b4f324ae2c1e5f12e6e639694b21f76d5b49625..3c86150dd768b4e490b603227de28aa57275ee4b:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 5dede2bf17..4f7bb21448 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -440,7 +440,7 @@ void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event ) sx = parentSize.x - myPos.x; if (mySize.x > sx) sx = mySize.x; - SetSize(sx, wxDefaultSize.y); + SetSize(sx, wxDefaultCoord); } event.Skip(); @@ -791,9 +791,10 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent, #endif wxVisualAttributes attr = GetDefaultAttributes(); - SetDefaultForegroundColour( attr.colFg ); - SetDefaultBackgroundColour( attr.colBg ); - SetDefaultFont(attr.font); + SetOwnForegroundColour( attr.colFg ); + SetOwnBackgroundColour( attr.colBg ); + if (!m_hasFont) + SetOwnFont(attr.font); // m_dottedPen = wxPen( "grey", 0, wxDOT ); too slow under XFree86 m_dottedPen = wxPen( wxT("grey"), 0, 0 ); @@ -2768,9 +2769,9 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) (keyCode >= 'A' && keyCode <= 'Z' ))) { // find the next item starting with the given prefix - char ch = (char)keyCode; + wxChar ch = (wxChar)keyCode; - wxTreeItemId id = FindItem(m_current, m_findPrefix + (wxChar)ch); + wxTreeItemId id = FindItem(m_current, m_findPrefix + ch); if ( !id.IsOk() ) { // no such item