minor cleanup 2 - reformatting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4909,7 +4909,8 @@ wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg )
|
||||
#if defined(__WXMOTIF__)
|
||||
int cw, ch;
|
||||
m_gridWin->GetClientSize( &cw, &ch );
|
||||
if ( r.GetTop() > ch ) r.SetTop( 0 );
|
||||
if ( r.GetTop() > ch )
|
||||
r.SetTop( 0 );
|
||||
r.SetBottom( wxMin( r.GetBottom(), ch ) );
|
||||
#endif
|
||||
|
||||
@@ -4959,7 +4960,8 @@ wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg )
|
||||
#if defined(__WXMOTIF__)
|
||||
int cw, ch;
|
||||
m_gridWin->GetClientSize( &cw, &ch );
|
||||
if ( r.GetLeft() > cw ) r.SetLeft( 0 );
|
||||
if ( r.GetLeft() > cw )
|
||||
r.SetLeft( 0 );
|
||||
r.SetRight( wxMin( r.GetRight(), cw ) );
|
||||
#endif
|
||||
|
||||
@@ -7017,7 +7019,7 @@ void wxGrid::DrawGridCellArea( wxDC& dc, const wxGridCellCoordsArray& cells )
|
||||
{
|
||||
for ( int l = 0; l < cell_rows; l++ )
|
||||
{
|
||||
// find a cell in this row to left alreay marked for repaint
|
||||
// find a cell in this row to leave already marked for repaint
|
||||
int left = col;
|
||||
for (int k = 0; k < int(redrawCells.GetCount()); k++)
|
||||
if ((redrawCells[k].GetCol() < left) &&
|
||||
@@ -7173,10 +7175,10 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
|
||||
|
||||
if (penWidth > 0)
|
||||
{
|
||||
// The center of th drawn line is where the position/width/height of
|
||||
// the rectangle is actually at, (on wxMSW at least,) so we will
|
||||
// reduce the size of the rectangle to compensate for the thickness of
|
||||
// the line. If this is too strange on non wxMSW platforms then
|
||||
// The center of the drawn line is where the position/width/height of
|
||||
// the rectangle is actually at (on wxMSW at least), so the
|
||||
// size of the rectangle is reduced to compensate for the thickness of
|
||||
// the line. If this is too strange on non-wxMSW platforms then
|
||||
// please #ifdef this appropriately.
|
||||
rect.x += penWidth / 2;
|
||||
rect.y += penWidth / 2;
|
||||
@@ -8287,11 +8289,11 @@ void wxGrid::MakeCellVisible( int row, int col )
|
||||
}
|
||||
|
||||
// we divide it later by GRID_SCROLL_LINE, make sure that we don't
|
||||
// have rounding errors (this is important, because if we do, we
|
||||
// might not scroll at all and some cells won't be redrawn)
|
||||
// have rounding errors (this is important, because if we do,
|
||||
// we might not scroll at all and some cells won't be redrawn)
|
||||
//
|
||||
// Sometimes GRID_SCROLL_LINE/2 is not enough, so just add a full
|
||||
// scroll unit...
|
||||
// Sometimes GRID_SCROLL_LINE / 2 is not enough,
|
||||
// so just add a full scroll unit...
|
||||
ypos += m_scrollLineY;
|
||||
}
|
||||
|
||||
@@ -9823,7 +9825,7 @@ void wxGrid::SetColSize( int col, int width )
|
||||
InitColWidths();
|
||||
}
|
||||
|
||||
// if < 0 calc new width from label
|
||||
// if < 0 then calculate new width from label
|
||||
if ( width < 0 )
|
||||
{
|
||||
long w, h;
|
||||
@@ -9945,9 +9947,7 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
|
||||
wxSize size = renderer->GetBestSize(*this, *attr, dc, row, col);
|
||||
extent = column ? size.x : size.y;
|
||||
if ( extent > extentMax )
|
||||
{
|
||||
extentMax = extent;
|
||||
}
|
||||
|
||||
renderer->DecRef();
|
||||
}
|
||||
@@ -9970,9 +9970,7 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
|
||||
|
||||
extent = column ? w : h;
|
||||
if ( extent > extentMax )
|
||||
{
|
||||
extentMax = extent;
|
||||
}
|
||||
|
||||
if ( !extentMax )
|
||||
{
|
||||
@@ -10039,9 +10037,7 @@ int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin)
|
||||
for ( int col = 0; col < m_numCols; col++ )
|
||||
{
|
||||
if ( !calcOnly )
|
||||
{
|
||||
AutoSizeColumn(col, setAsMin);
|
||||
}
|
||||
|
||||
width += GetColWidth(col);
|
||||
}
|
||||
|
Reference in New Issue
Block a user