diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-05-11 06:41:11 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-14 12:57:08 -0700 |
commit | 46d582ef0a3cfaa036796fd6c1cfd5660903ef08 (patch) | |
tree | f1f76f54911a5b69f5d3d86a63e786688b672cec /mobile-widgets | |
parent | cdfcb7f8968f2dc12782dd27089fa3843c45c630 (diff) | |
download | subsurface-46d582ef0a3cfaa036796fd6c1cfd5660903ef08.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/TemplateLabelSmall.qml | 19 | ||||
-rw-r--r-- | mobile-widgets/qml/mobile-resources.qrc | 1 |
2 files changed, 20 insertions, 0 deletions
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 + } +} + diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc index c76e4b7de..4462ab1c8 100644 --- a/mobile-widgets/qml/mobile-resources.qrc +++ b/mobile-widgets/qml/mobile-resources.qrc @@ -5,6 +5,7 @@ <file>TemplateCheckBox.qml</file> <file>TemplateComboBox.qml</file> <file>TemplateLabel.qml</file> + <file>TemplateLabelSmall.qml</file> <file>TemplateLine.qml</file> <file>TemplateRadioButton.qml</file> <file>TemplatePage.qml</file> |