X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f91f3a333110fd08795ac3c0551725dd61956a1..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/generic/headerctrlg.cpp?ds=sidebyside diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index 82eedac84c..279c1d031b 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -39,8 +39,6 @@ namespace { -const unsigned NO_SORT = (unsigned)-1; - const unsigned COL_NONE = (unsigned)-1; } // anonymous namespace @@ -182,7 +180,7 @@ unsigned int wxHeaderCtrl::FindColumnAtPoint(int x, bool *onSeparator) const pos += col.GetWidth(); - // if the column is resizeable, check if we're approximatively over the + // if the column is resizable, check if we're approximatively over the // line separating it from the next column // // TODO: don't hardcode sensitivity @@ -258,26 +256,14 @@ void wxHeaderCtrl::ClearMarkers() dcover.Clear(); } -void wxHeaderCtrl::UpdateResizingMarker(int xPhysical) -{ - wxClientDC dc(this); - - wxDCOverlay dcover(m_overlay, &dc); - dcover.Clear(); - - // unfortunately drawing the marker over the parent window doesn't work as - // it's usually covered by another window (the main control view) so just - // draw the marker over the header itself, even if it makes it not very - // useful - dc.SetPen(*wxLIGHT_GREY_PEN); - dc.DrawLine(xPhysical, 0, xPhysical, GetClientSize().y); -} - void wxHeaderCtrl::EndDragging() { - ClearMarkers(); - - m_overlay.Reset(); + // We currently only use markers for reordering, not for resizing + if (IsReordering()) + { + ClearMarkers(); + m_overlay.Reset(); + } // don't use the special dragging cursor any more SetCursor(wxNullCursor); @@ -344,7 +330,6 @@ void wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical) } //else: we had already done the above when we started - UpdateResizingMarker(xPhysical); } } @@ -495,10 +480,10 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) { int w, h; GetClientSize(&w, &h); - + #ifdef __WXGTK__ - int vw; - GetVirtualSize(&vw, NULL); +// int vw; +// GetVirtualSize(&vw, NULL); #endif wxAutoBufferedPaintDC dc(this); @@ -541,7 +526,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) { state = wxCONTROL_DISABLED; } - + if (i == 0) state |= wxCONTROL_SPECIAL; @@ -549,11 +534,11 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) params.m_labelText = col.GetTitle(); params.m_labelBitmap = col.GetBitmap(); params.m_labelAlignment = col.GetAlignment(); - + #ifdef __WXGTK__ if (i == count-1) { - colWidth = wxMax( colWidth, vw - xpos ); +// colWidth = wxMax( colWidth, vw - xpos ); state |= wxCONTROL_DIRTY; } #endif