From 46d582ef0a3cfaa036796fd6c1cfd5660903ef08 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 11 May 2020 06:41:11 -0700 Subject: mobile: add smaller, vertically dense template label By default single line text has too much white space around it. This smaller, denser label works well to more efficiently use screen real estate, I think. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/TemplateLabelSmall.qml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mobile-widgets/qml/TemplateLabelSmall.qml (limited to 'mobile-widgets/qml/TemplateLabelSmall.qml') diff --git a/mobile-widgets/qml/TemplateLabelSmall.qml b/mobile-widgets/qml/TemplateLabelSmall.qml new file mode 100644 index 000000000..af8c23d9e --- /dev/null +++ b/mobile-widgets/qml/TemplateLabelSmall.qml @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 +import QtQuick 2.11 +import QtQuick.Controls 2.4 + +Label { + id: myLabel + color: subsurfaceTheme.textColor + font.pointSize: subsurfaceTheme.smallPointSize + lineHeight: 0.6 + property alias colorBackground: myLabelBackground.color + + background: Rectangle { + id: myLabelBackground + implicitWidth: myLabel.width + implicitHeight: myLabel.width + color: subsurfaceTheme.backgroundColor + } +} + -- cgit v1.2.3-70-g09d2