diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-07-21 00:36:17 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-07-26 04:10:17 (GMT) |
commit | df40f6846b509087282178bffe572117d8d3eb33 (patch) | |
tree | 34a2d415adaac29cef6c74cbfc9b147b2a1f6701 /tests/auto | |
parent | fb065bb1ca4c49194e8a936ec0babba04f8471a1 (diff) | |
download | Qt-df40f6846b509087282178bffe572117d8d3eb33.zip Qt-df40f6846b509087282178bffe572117d8d3eb33.tar.gz Qt-df40f6846b509087282178bffe572117d8d3eb33.tar.bz2 |
font.letterSpacing used percentage rather than absolute values.
... and percentage is useless.
Task-number: QTBUG-12282
Reviewed-by: Warwick Allison
(cherry picked from commit 78a01438e5a37fd1778924f73ca8bfa55960b0d0)
Diffstat (limited to 'tests/auto')
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 80198eb..a1d9f02 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -847,22 +847,22 @@ void tst_qdeclarativetext::letterSpacing() QCOMPARE(textObject->font().letterSpacing(), 0.0); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -50 }"; + QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -2 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE(textObject->font().letterSpacing(), -50.); + QCOMPARE(textObject->font().letterSpacing(), -2.); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 200 }"; + QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 3 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create()); QVERIFY(textObject != 0); - QCOMPARE(textObject->font().letterSpacing(), 200.); + QCOMPARE(textObject->font().letterSpacing(), 3.); } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml index 73dd4d7..e268a60 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml @@ -34,10 +34,10 @@ Rectangle { text: s.text; font.underline: true; font.overline: true; font.strikeout: true } Text { - text: s.text; font.letterSpacing: 200 + text: s.text; font.letterSpacing: 2 } Text { - text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue" + text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue" } Text { text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml index b41b93a..a883b9c 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml @@ -34,10 +34,10 @@ Rectangle { text: s.text; font.underline: true; font.overline: true; font.strikeout: true } Text { - text: s.text; font.letterSpacing: 200 + text: s.text; font.letterSpacing: 2 } Text { - text: s.text; font.underline: true; font.letterSpacing: 200; font.capitalization: "AllUppercase"; color: "blue" + text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue" } Text { text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green" |