aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-02-11 18:54:33 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 10:18:09 -0800
commit99cce7e807f672426328ba3ddf4fad9d69e7e1a7 (patch)
treed4b3ce3780307495011206ebed003e59002e5747
parent8468d28a4127e5b79ef948cc42dca4106a36757a (diff)
downloadsubsurface-99cce7e807f672426328ba3ddf4fad9d69e7e1a7.tar.gz
mobile-widgets/qml: add TemplateLabel
standard font-size as well as color are set in the template (but can be overwritten in the object) Using TemplateLabel 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/TemplateLabel.qml9
-rw-r--r--mobile-widgets/qml/mobile-resources.qrc1
2 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qml/TemplateLabel.qml b/mobile-widgets/qml/TemplateLabel.qml
new file mode 100644
index 000000000..d022e2256
--- /dev/null
+++ b/mobile-widgets/qml/TemplateLabel.qml
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
+import QtQuick 2.11
+import QtQuick.Controls 2.4
+
+Label {
+ color: subsurfaceTheme.textColor
+ font.pointSize: subsurfaceTheme.regularPointSize
+}
+
diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc
index 2a42d9f46..73b869369 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>TemplateLabel.qml</file>
<file>TemplateSection.qml</file>
<!-- ********** qml ********** -->