summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-13 21:51:30 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-13 21:51:30 +0800
commite86931545352387e7a8c5929dee2e9934d042800 (patch)
tree52935af186e3592241bc9096e093e9d34bb0c365 /components
parent8e31e45ffa1b0029c91556ca29337eb7162dfd1d (diff)
finish style bar(almost)
Diffstat (limited to 'components')
-rw-r--r--components/SimpleResource.qml53
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
+ }
+ }
}
}