summaryrefslogtreecommitdiff
path: root/src/gui/painting/qemulationpaintengine.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-02-04 09:07:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-05 09:10:16 +0100
commit11189af016c1deeefed476c5cc3a408f6ee79a2d (patch)
treec23e54f8862ee6a8069f5aa52c9f88770ca7e9fe /src/gui/painting/qemulationpaintengine.cpp
parent41fea09d63c562a6b0bc678221eac95149250c33 (diff)
downloadqtbase-11189af016c1deeefed476c5cc3a408f6ee79a2d.tar.gz
Remove some left-over +1 in font height calculation
In change cb8445f0323b0eefbb04f1d8adad81a00b53abd8, I tried to remove all the historical +1s when calculating the font height from the ascent and descent, but I missed a couple. These are used when drawing the background for the text, the height of which would no longer match the height returned from QFontMetrics. [ChangeLog][Text] Fixed off-by-one in the height of text background. Task-number: QTBUG-36444 Change-Id: If6d87f903e246f9faed2298bb1693b2556906eed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/gui/painting/qemulationpaintengine.cpp')
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index bb87b4fd6e..0fb907b6c5 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -169,7 +169,7 @@ void QEmulationPaintEngine::drawTextItem(const QPointF &p, const QTextItem &text
{
if (state()->bgMode == Qt::OpaqueMode) {
const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
- QRectF rect(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent + 1).toReal());
+ QRectF rect(p.x(), p.y() - ti.ascent.toReal(), ti.width.toReal(), (ti.ascent + ti.descent).toReal());
fillBGRect(rect);
}