diff options
author | jan Iversen <jan@casacondor.com> | 2020-01-24 10:15:21 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-27 14:25:03 -0800 |
commit | bb13065a75fd02d0732575b2c01cb3210ad96f32 (patch) | |
tree | 87dc707dd2566956796e3ddc8a5394c8044ec47c | |
parent | 0920adf40fa16e61626108d3b3f79d87de8c214a (diff) | |
download | subsurface-bb13065a75fd02d0732575b2c01cb3210ad96f32.tar.gz |
mobile-widgets/qml: add background color property
Add property "colorBackground" to allow instances of templateLabel to have
background color overwritten.
Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/TemplateLabel.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mobile-widgets/qml/TemplateLabel.qml b/mobile-widgets/qml/TemplateLabel.qml index d022e2256..4754a8121 100644 --- a/mobile-widgets/qml/TemplateLabel.qml +++ b/mobile-widgets/qml/TemplateLabel.qml @@ -3,7 +3,16 @@ import QtQuick 2.11 import QtQuick.Controls 2.4 Label { + id: myLabel color: subsurfaceTheme.textColor font.pointSize: subsurfaceTheme.regularPointSize + property alias colorBackground: myLabelBackground.color + + background: Rectangle { + id: myLabelBackground + implicitWidth: myLabel.width + implicitHeight: myLabel.width + color: subsurfaceTheme.backgroundColor + } } |