summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-21 10:36:17 +1000
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-26 14:10:17 +1000
commitdf40f6846b509087282178bffe572117d8d3eb33 (patch)
tree34a2d415adaac29cef6c74cbfc9b147b2a1f6701 /tests
parentfb065bb1ca4c49194e8a936ec0babba04f8471a1 (diff)
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')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml4
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 80198eb576..a1d9f02a21 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 73dd4d7844..e268a60e83 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 b41b93a31a..a883b9cacc 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"