aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-02-11 18:53:06 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 10:18:10 -0800
commitf44fa1aa278463aa88910b50e846332fc7a833e1 (patch)
tree3b47d95f56c763969400c3f28ed886c07c16f994
parent43b813d58e4a06c359b6c7a5838d50c9bd50b9f2 (diff)
downloadsubsurface-f44fa1aa278463aa88910b50e846332fc7a833e1.tar.gz
mobile-widgets/qml: add TemplateCheckBox
standard font-size as well as color are set in the template (but can be overwritten in the object) Using TemplateCheckBox 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>
-rw-r--r--mobile-widgets/qml/TemplateCheckBox.qml9
-rw-r--r--mobile-widgets/qml/mobile-resources.qrc1
2 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qml/TemplateCheckBox.qml b/mobile-widgets/qml/TemplateCheckBox.qml
new file mode 100644
index 000000000..bc71dba8a
--- /dev/null
+++ b/mobile-widgets/qml/TemplateCheckBox.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
+
+CheckBox {
+ Layout.fillWidth: true
+ font.pointSize: subsurfaceTheme.regularPointSize
+}
diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc
index ad1d26a3c..60760c0ae 100644
--- a/mobile-widgets/qml/mobile-resources.qrc
+++ b/mobile-widgets/qml/mobile-resources.qrc
@@ -1,6 +1,7 @@
<RCC>
<qresource prefix="/qml">
<!-- ********** Templates ********** -->
+ <file>TemplateCheckBox.qml</file>
<file>TemplateLabel.qml</file>
<file>TemplateRadioButton.qml</file>
<file>TemplateSection.qml</file>