improve display of hints during column move (#9884)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -391,6 +391,7 @@ All (GUI):
|
|||||||
- Added "enabled" and "hidden" attributes to radio box items in XRC.
|
- Added "enabled" and "hidden" attributes to radio box items in XRC.
|
||||||
- wxWindow::IsBeingDeleted() now returns true not only if the window itself is
|
- wxWindow::IsBeingDeleted() now returns true not only if the window itself is
|
||||||
marked for destruction but also if any of its parent windows are.
|
marked for destruction but also if any of its parent windows are.
|
||||||
|
- Improved drawing of the hint during column move in wxGrid.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -5574,6 +5574,14 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
|
|
||||||
if ( m_moveToCol < 0 )
|
if ( m_moveToCol < 0 )
|
||||||
markerX = GetColRight( GetColAt( m_numCols - 1 ) );
|
markerX = GetColRight( GetColAt( m_numCols - 1 ) );
|
||||||
|
else if ( x >= (GetColLeft( m_moveToCol ) + (GetColWidth(m_moveToCol) / 2)) )
|
||||||
|
{
|
||||||
|
m_moveToCol = GetColAt( GetColPos( m_moveToCol ) + 1 );
|
||||||
|
if ( m_moveToCol < 0 )
|
||||||
|
markerX = GetColRight( GetColAt( m_numCols - 1 ) );
|
||||||
|
else
|
||||||
|
markerX = GetColLeft( m_moveToCol );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
markerX = GetColLeft( m_moveToCol );
|
markerX = GetColLeft( m_moveToCol );
|
||||||
|
|
||||||
@@ -5599,17 +5607,17 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
DrawColLabel( dc, XToCol( m_dragLastPos ) );
|
DrawColLabel( dc, XToCol( m_dragLastPos ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wxColour *color;
|
||||||
//Moving to the same place? Don't draw a marker
|
//Moving to the same place? Don't draw a marker
|
||||||
if ( (m_moveToCol == m_dragRowOrCol)
|
if ( (m_moveToCol == m_dragRowOrCol)
|
||||||
|| (GetColPos( m_moveToCol ) == GetColPos( m_dragRowOrCol ) + 1)
|
|| (GetColPos( m_moveToCol ) == GetColPos( m_dragRowOrCol ) + 1)
|
||||||
|| (m_moveToCol < 0 && m_dragRowOrCol == GetColAt( m_numCols - 1 )))
|
|| (m_moveToCol < 0 && m_dragRowOrCol == GetColAt( m_numCols - 1 )))
|
||||||
{
|
color = wxLIGHT_GREY;
|
||||||
m_dragLastPos = -1;
|
else
|
||||||
return;
|
color = wxBLUE;
|
||||||
}
|
|
||||||
|
|
||||||
//Draw the marker
|
//Draw the marker
|
||||||
wxPen pen( *wxBLUE, 2 );
|
wxPen pen( *color, 2 );
|
||||||
dc.SetPen(pen);
|
dc.SetPen(pen);
|
||||||
|
|
||||||
dc.DrawLine( markerX, 0, markerX, ch );
|
dc.DrawLine( markerX, 0, markerX, ch );
|
||||||
|
Reference in New Issue
Block a user