]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp
Spelling corrections
[wxWidgets.git] / wxPython / contrib / gizmos / wxCode / src / treelistctrl.cpp
index 8aef1b7cba842e019244d5a5d2527c113d239331..c147e7577166996f235bfd5b56890ae2a74a4a05 100644 (file)
@@ -1294,7 +1294,7 @@ void wxTreeListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
     {
         //DoDrawRect( &dc, x, HEADER_OFFSET_Y, more_w, h-2 );
         wxRendererNative::Get().DrawHeaderButton(
-            this, dc, wxRect(x, HEADER_OFFSET_Y, more_w, h-3),
+            this, dc, wxRect(x, HEADER_OFFSET_Y, more_w, h-2),
             m_parent->IsEnabled() ? 0 : wxCONTROL_DISABLED);
     }
 
@@ -1676,8 +1676,10 @@ wxTreeListItem *wxTreeListItem::HitTest(const wxPoint& point,
             }
 
             // check for image hit
-            if (theCtrl->m_imgWidth > 0) {
+            if (theCtrl->m_imgWidth > 0 && GetImage() != NO_IMAGE) {
                 int imgX = m_x - theCtrl->m_imgWidth2;
+                if (HasPlus() && theCtrl->HasButtons())
+                    imgX += theCtrl->m_btnWidth + LINEATROOT;
                 int imgY = y_mid - theCtrl->m_imgHeight2;
                 if ((point.x >= imgX) && (point.x <= (imgX + theCtrl->m_imgWidth)) &&
                     (point.y >= imgY) && (point.y <= (imgY + theCtrl->m_imgHeight))) {
@@ -1875,7 +1877,7 @@ void wxTreeListMainWindow::Init()
 
     m_underMouse = NULL;
 
-#if defined( __WXMAC__ ) && __WXMAC_CARBON__
+#if defined( __WXMAC__ ) && defined(__WXMAC_CARBON__)
     m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
 #else
     m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
@@ -4629,10 +4631,10 @@ void wxTreeListCtrl::CalculateAndSetHeaderHeight()
         h += d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT;
 
         // only update if changed
-        if ( h != m_headerHeight )
+        if ( h != (int)m_headerHeight )
         {
-            m_headerHeight = h;
-            //m_header_win->SetSize(m_header_win->GetSize().x, m_headerHeight);
+            m_headerHeight = (size_t)h;
+            m_header_win->SetSize(m_header_win->GetSize().x, m_headerHeight);
         }
     }
 }
@@ -4642,7 +4644,6 @@ void wxTreeListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
 {
     int w, h;
     GetClientSize(&w, &h);
-    printf("%d  (%d, %d)\n", m_headerHeight, w, h);
     if (m_header_win)
         m_header_win->SetSize(0, 0, w, m_headerHeight);
     if (m_main_win)