aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_textarea.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-20 13:05:35 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-20 13:31:01 +0000
commit594f55333b04603cad63323fc478565743077db2 (patch)
treed7cd382d53fdef3ff304a2f874cbf7225e5a2d40 /tests/auto/controls/data/tst_textarea.qml
parentaf531e14b31da62347fe489562951fdf7f378208 (diff)
TextArea & TextField: fix placeholder alignment
Placeholder text should follow the alignment of the control itself, so that text input appears in the same place where a placeholder was. Change-Id: I1dfa6c2aece10eb92e62a14f347c7e1ec5e610ea Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_textarea.qml')
-rw-r--r--tests/auto/controls/data/tst_textarea.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml
index 2b612d07..1c31f435 100644
--- a/tests/auto/controls/data/tst_textarea.qml
+++ b/tests/auto/controls/data/tst_textarea.qml
@@ -83,4 +83,18 @@ TestCase {
compare(control.implicitHeight, 200)
control.destroy()
}
+
+ function test_alignment() {
+ var control = textArea.createObject(testCase)
+
+ control.horizontalAlignment = TextArea.AlignRight
+ compare(control.horizontalAlignment, TextArea.AlignRight)
+ compare(control.placeholder.horizontalAlignment, Text.AlignRight)
+
+ control.verticalAlignment = TextArea.AlignBottom
+ compare(control.verticalAlignment, TextArea.AlignBottom)
+ compare(control.placeholder.verticalAlignment, Text.AlignBottom)
+
+ control.destroy()
+ }
}