Skip to content

Commit c012266

Browse files
committed
quickshell: centralize more values
1 parent f7a1681 commit c012266

File tree

5 files changed

+22
-13
lines changed

5 files changed

+22
-13
lines changed

home/services/quickshell/bar/Bar.qml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ PanelWindow {
3232
anchors.left: parent.left
3333
anchors.top: parent.top
3434

35-
anchors.leftMargin: height / 4
36-
anchors.rightMargin: height / 4
37-
spacing: height / 4
35+
anchors.leftMargin: Config.spacing
36+
anchors.rightMargin: Config.spacing
37+
spacing: Config.spacing
3838

3939
Workspaces {}
4040
}
@@ -47,9 +47,9 @@ PanelWindow {
4747
anchors.horizontalCenter: parent.horizontalCenter
4848
anchors.top: parent.top
4949

50-
anchors.leftMargin: height / 4
51-
anchors.rightMargin: height / 4
52-
spacing: height / 4
50+
anchors.leftMargin: Config.spacing
51+
anchors.rightMargin: Config.spacing
52+
spacing: Config.spacing
5353

5454
Mpris {}
5555
}
@@ -62,9 +62,9 @@ PanelWindow {
6262
anchors.right: parent.right
6363
anchors.top: parent.top
6464

65-
anchors.leftMargin: height / 4
66-
anchors.rightMargin: height / 4
67-
spacing: height / 4
65+
anchors.leftMargin: Config.spacing
66+
anchors.rightMargin: Config.spacing
67+
spacing: Config.spacing
6868

6969
Tray {}
7070
Resources {}

home/services/quickshell/bar/Resources.qml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Rectangle {
1010
color: "transparent"
1111
implicitWidth: rowLayout.width
1212

13-
property int valueSize: 7
14-
property int textSize: 5
13+
readonly property int valueSize: 7
14+
readonly property int textSize: 5
15+
readonly property int spacing: 0
1516

1617
property color valueColor: Colors.foreground
1718
property string textColor: "lightgray"
@@ -24,7 +25,8 @@ Rectangle {
2425
text: ResourcesState.cpu_freq
2526

2627
ColumnLayout {
27-
id: cpuColumn
28+
spacing: root.spacing
29+
2830
Text {
2931
color: root.textColor
3032
font.pointSize: root.textSize
@@ -42,7 +44,10 @@ Rectangle {
4244

4345
HoverTooltip {
4446
text: ResourcesState.mem_used
47+
4548
ColumnLayout {
49+
spacing: root.spacing
50+
4651
Text {
4752
color: root.textColor
4853
font.pointSize: root.textSize

home/services/quickshell/bar/Tray.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ WrapperRectangle {
1212
color: "transparent"
1313

1414
RowLayout {
15+
spacing: Config.spacing
16+
1517
Repeater {
1618
model: SystemTray.items
1719

home/services/quickshell/components/TextTooltip.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ PopupWindow {
2525
id: textRect
2626

2727
color: Colors.bgBlur
28-
margin: 4
28+
margin: 6
2929
radius: 8
3030

3131
Text {

home/services/quickshell/utils/Config.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ Singleton {
99

1010
readonly property int notificationExpireTimeout: 10
1111
readonly property int iconSize: 14
12+
readonly property int barHeight: 32
13+
readonly property real spacing: 12
1214
}

0 commit comments

Comments
 (0)