diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-11-20 18:39:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-26 19:11:53 +0100 |
commit | f28449dd060ac6b2f6969a6adba6dbd5d095b18e (patch) | |
tree | d54132ad401ed9366534a6267f0e625cf8325eab /tests/auto/controls/data/tst_textfield.qml | |
parent | 6ab374f0fd530c841470f93c8befb92f1f646470 (diff) | |
download | qtquickcontrols-f28449dd060ac6b2f6969a6adba6dbd5d095b18e.tar.gz |
Make TextFieldStyle and SpinBoxStyle respect font size
This makes both the controls respect a custom font size.
Before this patch these controls would only support the
global application font.
Task-number: QTBUG-34750
Change-Id: I200a14adba5b75088ab54ba691430330d9226ada
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_textfield.qml')
-rw-r--r-- | tests/auto/controls/data/tst_textfield.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml index a5dc2d87..a526d1f0 100644 --- a/tests/auto/controls/data/tst_textfield.qml +++ b/tests/auto/controls/data/tst_textfield.qml @@ -280,6 +280,16 @@ TestCase { control.destroy() } + function test_setFontsize(){ + var control = Qt.createQmlObject('import QtQuick.Controls 1.1; import QtQuick.Controls.Styles 1.1; TextField {style:TextFieldStyle{}}', container, '') + var width = control.width; + var height = control.height; + control.font.pixelSize = 40 + verify(control.width > width) // ensure that the text field resizes + verify(control.height > height) + control.destroy() + } + function test_activeFocusOnTab() { // Set TextField readonly so the tab/backtab can be tested toward the navigation var test_control = 'import QtQuick 2.1; \ |