diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-01-03 09:44:32 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-01-03 09:28:31 +0000 |
commit | d26d6a46bb5793e4a3bdc2c7a387f8f8a89b349b (patch) | |
tree | be4aa09f65a7a938d56df34912205abc29c3f9a9 /tests | |
parent | 9378dc92968a2267bf51811329c0d79d37067279 (diff) |
Respect user font settings from qtquickcontrols2.conf file
Resolve the style's font against the font that the user set in the
configuration file, rather than only using the style's font.
This patch also removes all of the fonts which were identical and
replaces them with a single font.
Task-number: QTBUG-65500
Change-Id: I284b0d75ac3ad5bf7123bbd13bbfe85d25145483
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qquickimaginestyle/data/tst_imagine.qml | 11 | ||||
-rw-r--r-- | tests/auto/qquickimaginestyle/qtquickcontrols2.conf | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qquickimaginestyle/data/tst_imagine.qml b/tests/auto/qquickimaginestyle/data/tst_imagine.qml index 7a711dcd..72df8814 100644 --- a/tests/auto/qquickimaginestyle/data/tst_imagine.qml +++ b/tests/auto/qquickimaginestyle/data/tst_imagine.qml @@ -64,6 +64,11 @@ TestCase { name: "Imagine" Component { + id: buttonComponent + Button {} + } + + Component { id: implicitQrcButtonComponent Button { Imagine.path: ":/control-assets" @@ -94,4 +99,10 @@ TestCase { var image = grabImage(control) compare(image.pixel(control.width / 2, control.height / 2), "#ff0000") } + + function test_fontFromConfigFile() { + var control = createTemporaryObject(buttonComponent, testCase) + verify(control) + compare(control.font.pixelSize, 80) + } } diff --git a/tests/auto/qquickimaginestyle/qtquickcontrols2.conf b/tests/auto/qquickimaginestyle/qtquickcontrols2.conf index add378d4..cc58a8e3 100644 --- a/tests/auto/qquickimaginestyle/qtquickcontrols2.conf +++ b/tests/auto/qquickimaginestyle/qtquickcontrols2.conf @@ -1,2 +1,5 @@ [Controls] Style=Imagine + +[Imagine] +Font\PixelSize=80 |