From e18bad03dd51aed881a86715bfc17ef0c7fe5af9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 30 Nov 2009 14:37:15 +0100 Subject: Do not fill the disabled background of item. This is a regression against Qt 4.5 If one want special background for disabled item, one can use stylesheet, or BackgroundRole This partially revert 127e68d3dc4ff8329 Reviewed-by: jbache Task-number: QT-2388 Task-number: QTBUG-6319 --- src/gui/styles/qcommonstyle.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 4c9541b..5028e5f 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -770,8 +770,6 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); else if (vopt->features & QStyleOptionViewItemV2::Alternate) p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase)); - else if (!(vopt->state & QStyle::State_Enabled)) - p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Base)); } break; case PE_PanelItemViewItem: -- cgit v0.12 From 0f61a0f1ce02bb0248cb87055240a8a474dce452 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Fri, 27 Nov 2009 16:17:25 +0100 Subject: Fixed the GL2 engine stroker to handle Qt::SvgMiterJoin. Reviewed-by: Trond --- src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index c78f73f..6082f49 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -313,6 +313,7 @@ void QTriangulatingStroker::join(const qreal *pts) switch (m_join_style) { case Qt::BevelJoin: break; + case Qt::SvgMiterJoin: case Qt::MiterJoin: { // Find out on which side the join should be. int count = m_vertices.size(); -- cgit v0.12 From 0fa878c4d2dfc25d4641a6654a9b482230559c3a Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Mon, 30 Nov 2009 13:13:11 +0100 Subject: Fixed square root of negative number in drawTextItem(). Fixed potential bug where you could end up taking the square root of a negative number in drawTextItem() in the raster and OpenGL paint engines. Task-number: QTBUG-6327 Reviewed-by: Trond --- src/gui/painting/qpaintengine_raster.cpp | 3 ++- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 3f33319..4a72434 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3240,7 +3240,8 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte drawCached = false; // don't try to cache huge fonts - if (ti.fontEngine->fontDef.pixelSize * qSqrt(s->matrix.determinant()) >= 64) + const qreal pixelSize = ti.fontEngine->fontDef.pixelSize; + if (pixelSize * pixelSize * qAbs(s->matrix.determinant()) >= 64 * 64) drawCached = false; // ### Remove the TestFontEngine and Box engine crap, in these diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 07432c6..15702ba 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1452,7 +1452,8 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem drawCached = false; // don't try to cache huge fonts - if (ti.fontEngine->fontDef.pixelSize * qSqrt(s->matrix.determinant()) >= 64) + const qreal pixelSize = ti.fontEngine->fontDef.pixelSize; + if (pixelSize * pixelSize * qAbs(s->matrix.determinant()) >= 64 * 64) drawCached = false; QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0 -- cgit v0.12