Merge wxQT branch into the trunk.

This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-24 01:50:11 +00:00
parent d513d3e2f0
commit df13791078
381 changed files with 24333 additions and 938 deletions

View File

@@ -2258,7 +2258,7 @@ void wxGrid::Create()
// now that we have the grid window, use its font to compute the default
// row height
m_defaultRowHeight = m_gridWin->GetCharHeight();
#if defined(__WXMOTIF__) || defined(__WXGTK__) // see also text ctrl sizing in ShowCellEditControl()
#if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) // see also text ctrl sizing in ShowCellEditControl()
m_defaultRowHeight += 8;
#else
m_defaultRowHeight += 4;
@@ -5566,11 +5566,12 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
// 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.
#ifndef __WXQT__
rect.x += penWidth / 2;
rect.y += penWidth / 2;
rect.width -= penWidth - 1;
rect.height -= penWidth - 1;
#endif
// Now draw the rectangle
// use the cellHighlightColour if the cell is inside a selection, this
// will ensure the cell is always visible.
@@ -5838,7 +5839,7 @@ wxGrid::DoDrawGridLines(wxDC& dc,
int i = GetColAt( colPos );
int colRight = GetColRight(i);
#ifdef __WXGTK__
#if defined(__WXGTK__) || defined(__WXQT__)
if (GetLayoutDirection() != wxLayout_RightToLeft)
#endif
colRight--;
@@ -6360,6 +6361,7 @@ void wxGrid::ShowCellEditControl()
if (rect.x < 0)
nXMove = rect.x;
#ifndef __WXQT__
// cell is shifted by one pixel
// However, don't allow x or y to become negative
// since the SetSize() method interprets that as
@@ -6368,6 +6370,11 @@ void wxGrid::ShowCellEditControl()
rect.x--;
if (rect.y > 0)
rect.y--;
#else
// Substract 1 pixel in every dimension to fit in the cell area.
// If not, Qt will draw the control outside the cell.
rect.Deflate(1, 1);
#endif
wxGridCellEditor* editor = attr->GetEditor(this, row, col);
if ( !editor->IsCreated() )
@@ -6702,12 +6709,14 @@ wxRect wxGrid::CellToRect( int row, int col ) const
for (i=row; i < row + cell_rows; i++)
rect.height += GetRowHeight(i);
#ifndef __WXQT__
// if grid lines are enabled, then the area of the cell is a bit smaller
if (m_gridLinesEnabled)
{
rect.width -= 1;
rect.height -= 1;
}
#endif
}
return rect;
@@ -7439,7 +7448,7 @@ int wxGrid::GetColSize( int col ) const
void wxGrid::SetDefaultCellBackgroundColour( const wxColour& col )
{
m_defaultCellAttr->SetBackgroundColour(col);
#ifdef __WXGTK__
#if defined(__WXGTK__) || defined(__WXQT__)
m_gridWin->SetBackgroundColour(col);
#endif
}