]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp
Warning fixes.
[wxWidgets.git] / wxPython / contrib / gizmos / wxCode / src / treelistctrl.cpp
index ad47a548e279d9686e0303acc473919a48f4057f..79024a3bccf54335723eb62a5c9081713faba489 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))) {