summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-06-23 05:18:19 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:24:53 (GMT)
commiteb728b5212b863770a8f2016b4bef34b99d2cfe4 (patch)
treefda66e09909e16bb1cc3e88289ffffe708e9ea8c /src/gui/widgets
parentb5a1d5afbe6e238cc17df9255c2474b4b26cee94 (diff)
downloadQt-eb728b5212b863770a8f2016b4bef34b99d2cfe4.zip
Qt-eb728b5212b863770a8f2016b4bef34b99d2cfe4.tar.gz
Qt-eb728b5212b863770a8f2016b4bef34b99d2cfe4.tar.bz2
Fix painting of overlines in labels.
If the size of the widget is an odd number, the layout rect will be positioned at a 0.5 offset. The clipping set further below will snap this to 1 and thus clip away the anything drawn on the first row of pixels. Fix this by aligning the rectangle we get by layout rect. Reviewed-by: Eskil Task: http://bugreports.qt.nokia.com/browse/QTBUG-9684
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index f2a6965..26dd0e1 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -1072,7 +1072,7 @@ void QLabel::paintEvent(QPaintEvent *)
else
#endif
if (d->isTextLabel) {
- QRectF lr = d->layoutRect();
+ QRectF lr = d->layoutRect().toAlignedRect();
QStyleOption opt;
opt.initFrom(this);
#ifndef QT_NO_STYLE_STYLESHEET