aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-02-11 18:53:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 10:18:11 -0800
commit800973a9206e2479683ed1b0cc554834620f3034 (patch)
treed5d486ed9774faf0a8170cc4b1754abdab0f3b33 /mobile-widgets
parentf44fa1aa278463aa88910b50e846332fc7a833e1 (diff)
downloadsubsurface-800973a9206e2479683ed1b0cc554834620f3034.tar.gz
mobile-widgets/qml: add TemplateComboBox
standard font-size as well as color are set in the template (but can be overwritten in the object) Using TemplateComboBox allows central change of how labels are presented in the UI. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/TemplateComboBox.qml9
-rw-r--r--mobile-widgets/qml/mobile-resources.qrc1
2 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qml/TemplateComboBox.qml b/mobile-widgets/qml/TemplateComboBox.qml
new file mode 100644
index 000000000..e0582b7f0
--- /dev/null
+++ b/mobile-widgets/qml/TemplateComboBox.qml
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
+import QtQuick 2.11
+import QtQuick.Controls 2.4
+import QtQuick.Layouts 1.11
+
+ComboBox {
+ Layout.fillWidth: true
+ font.pointSize: theme.regularPointSize
+}
diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc
index 60760c0ae..df22a4cc8 100644
--- a/mobile-widgets/qml/mobile-resources.qrc
+++ b/mobile-widgets/qml/mobile-resources.qrc
@@ -2,6 +2,7 @@
<qresource prefix="/qml">
<!-- ********** Templates ********** -->
<file>TemplateCheckBox.qml</file>
+ <file>TemplateComboBox.qml</file>
<file>TemplateLabel.qml</file>
<file>TemplateRadioButton.qml</file>
<file>TemplateSection.qml</file>