diff options
Diffstat (limited to 'components/SimpleResource.qml')
| -rw-r--r-- | components/SimpleResource.qml | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/components/SimpleResource.qml b/components/SimpleResource.qml index 2d8a91f..6dc2bba 100644 --- a/components/SimpleResource.qml +++ b/components/SimpleResource.qml @@ -4,24 +4,49 @@ import QtQuick.Layouts import qs.config as Config import qs.components -RowLayout { +Item { id: root + required property string text required property string icon - Item { - Layout.fillWidth: true - } - anchors.fill: parent - spacing: Config.Bar.resourceIconTextSpacing - Icons { - text: root.icon - } - Text { - text: root.text - } + implicitWidth: container.implicitWidth + implicitHeight: container.implicitHeight + + Rectangle { + id: container + anchors { + fill: parent + verticalCenter: parent.verticalCenter + horizontalCenter: parent.horizontalCenter + } + implicitWidth: layout.implicitWidth + Config.General.rectMargin * 2 + implicitHeight: Config.Bar.height - Config.General.rectMargin + + color: Config.Colors.alt + radius: Config.Style.rounding.large + + RowLayout { + id: layout + + anchors { + verticalCenter: parent.verticalCenter + horizontalCenter: parent.horizontalCenter + } + + spacing: Config.Bar.resourceIconTextSpacing + + Icons { + text: root.icon + } + Text { + text: root.text + } - Item { - Layout.fillWidth: true + Item { + Layout.fillWidth: true + Layout.fillHeight: true + } + } } } |
