]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
typo
[wxWidgets.git] / src / generic / treectlg.cpp
index 2065d971d1f9fc4e8cf0e4ce80e92001e48a5dcc..ed8dacdd7bb8d3b947272390aaa09121a7006714 100644 (file)
@@ -261,12 +261,12 @@ private:
 
     // tree ctrl images for the normal, selected, expanded and
     // expanded+selected states
-    short               m_images[wxTreeItemIcon_Max];
+    int                 m_images[wxTreeItemIcon_Max];
 
     wxCoord             m_x;            // (virtual) offset from top
     wxCoord             m_y;            // (virtual) offset from left
-    short               m_width;        // width of this item
-    unsigned char       m_height;       // height of this item
+    int                 m_width;        // width of this item
+    int                 m_height;       // height of this item
 
     // use bitfields to save size
     int                 m_isCollapsed :1;
@@ -376,10 +376,11 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
     x += image_w;
     w -= image_w + 4;
 #ifdef __WXMAC__
+    wxSize bs = DoGetBestSize() ;
     // edit control height
-    if ( h > 22 - 8 )
+    if ( h > bs.y - 8 )
     {
-        int diff = h - ( 22 - 8 ) ;
+        int diff = h - ( bs.y - 8 ) ;
         h -= diff ;
         y += diff / 2 ;
     }
@@ -764,7 +765,7 @@ void wxGenericTreeCtrl::Init()
 
     m_lastOnSame = false;
 
-#if defined( __WXMAC__ ) && __WXMAC_CARBON__
+#ifdef __WXMAC_CARBON__ 
     m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
 #else
     m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );