summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bar/ActiveWindow.qml3
-rw-r--r--bar/Bar.qml105
-rw-r--r--config/Bar.qml2
3 files changed, 57 insertions, 53 deletions
diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml
index a2187e5..a95a68a 100644
--- a/bar/ActiveWindow.qml
+++ b/bar/ActiveWindow.qml
@@ -12,7 +12,8 @@ Item {
property var icon: Quickshell.iconPath(AppSearch.guessIcon(toplevel?.appId), "image-missing")
RowLayout {
- anchors.fill: parent
+ anchors.centerIn: parent
+ spacing: Bar.resourceIconTextSpacing
anchors.verticalCenter: parent.verticalCenter
IconImage {
diff --git a/bar/Bar.qml b/bar/Bar.qml
index 24fc0ce..1f39944 100644
--- a/bar/Bar.qml
+++ b/bar/Bar.qml
@@ -35,67 +35,70 @@ Scope {
leftMargin: Bar.leftMargin
rightMargin: Bar.rightMargin
}
+
RowLayout {
- id: rowLayout
- anchors.fill: parent
+ id: leftRow
+ implicitWidth: (child.width - centerRow.width) / 2
+ implicitHeight: child.height
- RowLayout {
- id: leftRow
- Layout.preferredWidth: 1
+ Workspace {
+ id: workspace
+ Layout.preferredWidth: 5
+ Layout.fillHeight: true
Layout.fillWidth: true
- spacing: 0
- // Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
-
- Workspace {
- id: workspace
- Layout.preferredWidth: 5
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.maximumWidth: 400
- }
- Mpris {
- id: mpris
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredWidth: 1
- }
- Item {
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredWidth: 1
- }
+ Layout.maximumWidth: 400 // FIXME
}
- Item {
- id: centerRow
+ Mpris {
+ id: mpris
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1
- ActiveWindow {}
}
- RowLayout {
- id: rightRow
+ Item {
Layout.fillWidth: true
+ Layout.fillHeight: true
Layout.preferredWidth: 1
- Cpu {
- Layout.fillHeight: true
- Layout.fillWidth: true
- }
- Memory {
- Layout.fillHeight: true
- Layout.fillWidth: true
- }
- Gpu {
- Layout.fillHeight: true
- Layout.fillWidth: true
- }
- Temp {
- Layout.fillHeight: true
- Layout.fillWidth: true
- }
- Network {
- Layout.fillHeight: true
- Layout.fillWidth: true
- }
+ }
+ }
+
+ Item {
+ id: centerRow
+ anchors.centerIn: parent
+ ActiveWindow {
+ anchors.fill: parent
+ }
+ }
+
+ RowLayout {
+ id: rightRow
+ anchors.right: parent.right
+ layoutDirection: Qt.RightToLeft
+ implicitWidth: (child.width - centerRow.width) / 2
+ implicitHeight: child.height
+
+ Cpu {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ Memory {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ Gpu {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ Temp {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ Network {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
}
}
}
diff --git a/config/Bar.qml b/config/Bar.qml
index 8e14851..d3e72a4 100644
--- a/config/Bar.qml
+++ b/config/Bar.qml
@@ -16,5 +16,5 @@ Singleton {
readonly property int appIconSize: 32
- readonly property int resourceIconTextSpacing: 8
+ readonly property int resourceIconTextSpacing: Style.spacing.small
}