summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_spinbox.qml
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-11-20 18:39:58 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 19:11:53 +0100
commitf28449dd060ac6b2f6969a6adba6dbd5d095b18e (patch)
treed54132ad401ed9366534a6267f0e625cf8325eab /tests/auto/controls/data/tst_spinbox.qml
parent6ab374f0fd530c841470f93c8befb92f1f646470 (diff)
downloadqtquickcontrols-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_spinbox.qml')
-rw-r--r--tests/auto/controls/data/tst_spinbox.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml
index 124ab881..176a70b5 100644
--- a/tests/auto/controls/data/tst_spinbox.qml
+++ b/tests/auto/controls/data/tst_spinbox.qml
@@ -343,6 +343,16 @@ Item {
spinbox2.destroy()
}
+ function test_setFontsize(){
+ var control = Qt.createQmlObject('import QtQuick.Controls 1.1; import QtQuick.Controls.Styles 1.1; SpinBox {style: SpinBoxStyle{}}', 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_get_active_focus_when_up_or_down_was_pressed(){
var test_control = 'import QtQuick 2.1; \
import QtQuick.Controls 1.1; \