diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-06-23 05:18:19 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-06-23 05:18:19 (GMT) |
commit | 13cacbd801e3077ad87d21c9b2607a4d7854308d (patch) | |
tree | 72a71a668cbf063ab580bcb69a07c220eebbb424 /src/gui/widgets | |
parent | 684de9f1bf5886e91547db6726afaa88587310ce (diff) | |
download | Qt-13cacbd801e3077ad87d21c9b2607a4d7854308d.zip Qt-13cacbd801e3077ad87d21c9b2607a4d7854308d.tar.gz Qt-13cacbd801e3077ad87d21c9b2607a4d7854308d.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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index bdbd0b0..f5393a9 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -1071,7 +1071,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 |