From da25b107a5164300ac372a74a66273bb274f95f4 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 18 Apr 2019 20:37:44 +0200 Subject: mobile-widgets/qml: add TemplateTitle Signed-off-by: Jan Iversen Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/TemplateTitle.qml | 26 ++++++++++++++++++++++++++ mobile-widgets/qml/mobile-resources.qrc | 1 + 2 files changed, 27 insertions(+) create mode 100644 mobile-widgets/qml/TemplateTitle.qml diff --git a/mobile-widgets/qml/TemplateTitle.qml b/mobile-widgets/qml/TemplateTitle.qml new file mode 100644 index 000000000..fabb482b2 --- /dev/null +++ b/mobile-widgets/qml/TemplateTitle.qml @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +import QtQuick 2.11 +import QtQuick.Controls 2.4 +import QtQuick.Layouts 1.11 + + +Item { + property alias title: myLabel.text + width: parent.width + height: myLabel.height + 1 + + Label { + id: myLabel + color: subsurfaceTheme.textColor + font.pointSize: subsurfaceTheme.titlePointSize + font.bold: true + anchors.horizontalCenter: parent.horizontalCenter + text: "using the TemplateTilte you need to set the title text" + } + TemplateLine { + anchors.top: myLabel.bottom + anchors.left: parent.left + anchors.right: parent.right + } +} + diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc index 0eba5ea0c..7d37b0c74 100644 --- a/mobile-widgets/qml/mobile-resources.qrc +++ b/mobile-widgets/qml/mobile-resources.qrc @@ -9,6 +9,7 @@ TemplateSection.qml TemplateSpinBox.qml TemplateTextField.qml + TemplateTitle.qml About.qml -- cgit v1.2.3-70-g09d2