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:
@@ -3822,7 +3822,7 @@ END_EVENT_TABLE()
|
|||||||
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
|
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size )
|
const wxPoint &pos, const wxSize &size )
|
||||||
: wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
|
: wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxFULL_REPAINT_ON_RESIZE )
|
||||||
{
|
{
|
||||||
m_owner = parent;
|
m_owner = parent;
|
||||||
}
|
}
|
||||||
@@ -4909,7 +4909,8 @@ wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg )
|
|||||||
#if defined(__WXMOTIF__)
|
#if defined(__WXMOTIF__)
|
||||||
int cw, ch;
|
int cw, ch;
|
||||||
m_gridWin->GetClientSize( &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 ) );
|
r.SetBottom( wxMin( r.GetBottom(), ch ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4959,7 +4960,8 @@ wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg )
|
|||||||
#if defined(__WXMOTIF__)
|
#if defined(__WXMOTIF__)
|
||||||
int cw, ch;
|
int cw, ch;
|
||||||
m_gridWin->GetClientSize( &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 ) );
|
r.SetRight( wxMin( r.GetRight(), cw ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -7017,7 +7019,7 @@ void wxGrid::DrawGridCellArea( wxDC& dc, const wxGridCellCoordsArray& cells )
|
|||||||
{
|
{
|
||||||
for ( int l = 0; l < cell_rows; l++ )
|
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;
|
int left = col;
|
||||||
for (int k = 0; k < int(redrawCells.GetCount()); k++)
|
for (int k = 0; k < int(redrawCells.GetCount()); k++)
|
||||||
if ((redrawCells[k].GetCol() < left) &&
|
if ((redrawCells[k].GetCol() < left) &&
|
||||||
@@ -7173,10 +7175,10 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
|
|||||||
|
|
||||||
if (penWidth > 0)
|
if (penWidth > 0)
|
||||||
{
|
{
|
||||||
// The center of th drawn line is where the position/width/height of
|
// The center of the drawn line is where the position/width/height of
|
||||||
// the rectangle is actually at, (on wxMSW at least,) so we will
|
// the rectangle is actually at (on wxMSW at least), so the
|
||||||
// reduce the size of the rectangle to compensate for the thickness of
|
// size of the rectangle is reduced to compensate for the thickness of
|
||||||
// the line. If this is too strange on non wxMSW platforms then
|
// the line. If this is too strange on non-wxMSW platforms then
|
||||||
// please #ifdef this appropriately.
|
// please #ifdef this appropriately.
|
||||||
rect.x += penWidth / 2;
|
rect.x += penWidth / 2;
|
||||||
rect.y += 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
|
// 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
|
// have rounding errors (this is important, because if we do,
|
||||||
// might not scroll at all and some cells won't be redrawn)
|
// 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
|
// Sometimes GRID_SCROLL_LINE / 2 is not enough,
|
||||||
// scroll unit...
|
// so just add a full scroll unit...
|
||||||
ypos += m_scrollLineY;
|
ypos += m_scrollLineY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9823,7 +9825,7 @@ void wxGrid::SetColSize( int col, int width )
|
|||||||
InitColWidths();
|
InitColWidths();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if < 0 calc new width from label
|
// if < 0 then calculate new width from label
|
||||||
if ( width < 0 )
|
if ( width < 0 )
|
||||||
{
|
{
|
||||||
long w, h;
|
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);
|
wxSize size = renderer->GetBestSize(*this, *attr, dc, row, col);
|
||||||
extent = column ? size.x : size.y;
|
extent = column ? size.x : size.y;
|
||||||
if ( extent > extentMax )
|
if ( extent > extentMax )
|
||||||
{
|
|
||||||
extentMax = extent;
|
extentMax = extent;
|
||||||
}
|
|
||||||
|
|
||||||
renderer->DecRef();
|
renderer->DecRef();
|
||||||
}
|
}
|
||||||
@@ -9970,9 +9970,7 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
|
|||||||
|
|
||||||
extent = column ? w : h;
|
extent = column ? w : h;
|
||||||
if ( extent > extentMax )
|
if ( extent > extentMax )
|
||||||
{
|
|
||||||
extentMax = extent;
|
extentMax = extent;
|
||||||
}
|
|
||||||
|
|
||||||
if ( !extentMax )
|
if ( !extentMax )
|
||||||
{
|
{
|
||||||
@@ -10039,9 +10037,7 @@ int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin)
|
|||||||
for ( int col = 0; col < m_numCols; col++ )
|
for ( int col = 0; col < m_numCols; col++ )
|
||||||
{
|
{
|
||||||
if ( !calcOnly )
|
if ( !calcOnly )
|
||||||
{
|
|
||||||
AutoSizeColumn(col, setAsMin);
|
AutoSizeColumn(col, setAsMin);
|
||||||
}
|
|
||||||
|
|
||||||
width += GetColWidth(col);
|
width += GetColWidth(col);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user