diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-11-05 10:46:41 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-12-03 14:47:19 +0000 |
commit | bbd6c9972206eccc4d2872be44db509ef716c351 (patch) | |
tree | 485fbef2f80b9be35695c3b1cc0bca6080fa6d07 /tests | |
parent | 1dff93937db7b3be48fdedbb60449260221dedc0 (diff) |
Fix QQuickIconLabel's baselineOffset
Set it to the bottom of the text if there is text.
Change-Id: I03e14ec587e0868e1f2104dd464591b243ea9264
Fixes: QTBUG-71554
Reviewed-by: Pierre-Yves Siret <gr3cko@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp b/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp index 1f00d8e7..0ecc95c5 100644 --- a/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp +++ b/tests/auto/qquickiconlabel/tst_qquickiconlabel.cpp @@ -216,6 +216,11 @@ void tst_qquickiconlabel::display() QCOMPARE(label->implicitHeight(), qMax(icon->implicitHeight(), text->implicitHeight()) + verticalPadding); break; } + + if (text) + QCOMPARE(label->baselineOffset(), text->y() + text->baselineOffset()); + else + QCOMPARE(label->baselineOffset(), 0); } } |