Little more tweaks
This commit is contained in:
@@ -145,28 +145,29 @@ printf 'time\t%s\n' "$($OMARCHY_PATH/bin/omarchy-battery-remaining-time 2>/dev/n
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
spacing: 12
|
spacing: 16
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
Text { text: root.batteryIcon(); color: root.bar.foreground; font.family: root.bar.fontFamily; font.pixelSize: 22 }
|
anchors.left: parent.left
|
||||||
Text { text: root.modeLabel(); color: root.bar.foreground; font.family: root.bar.fontFamily; font.pixelSize: 13; font.bold: true }
|
Text { id: acIcon; text: root.batteryIcon(); color: root.bar.foreground; font.family: root.bar.fontFamily; font.pixelSize: 22 }
|
||||||
|
Text { text: root.modeLabel(); color: root.bar.foreground; font.family: root.bar.fontFamily; font.pixelSize: 13; font.bold: true; anchors.verticalCenter: acIcon.verticalCenter }
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
visible: root.batteryInfo.percentage !== undefined
|
visible: root.batteryInfo.percentage !== undefined
|
||||||
width: parent.width
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
spacing: 20
|
spacing: 24
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: (parent.width - parent.spacing) / 2
|
width: 140
|
||||||
spacing: 4
|
spacing: 4
|
||||||
InfoPair { label: "Percentage"; value: root.batteryInfo.percentage || "" }
|
InfoPair { label: "Percentage"; value: root.batteryInfo.percentage || "" }
|
||||||
InfoPair { label: "Battery size"; value: root.batteryInfo.size || "" }
|
InfoPair { label: "Battery size"; value: root.batteryInfo.size || "" }
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: (parent.width - parent.spacing) / 2
|
width: 140
|
||||||
spacing: 4
|
spacing: 4
|
||||||
InfoPair { label: UPower.onBattery ? "Time left" : "Time to full"; value: root.batteryInfo.time || "—" }
|
InfoPair { label: UPower.onBattery ? "Time left" : "Time to full"; value: root.batteryInfo.time || "—" }
|
||||||
InfoPair { label: UPower.onBattery ? "Draw" : "Charge rate"; value: root.batteryInfo.rate || "" }
|
InfoPair { label: UPower.onBattery ? "Draw" : "Charge rate"; value: root.batteryInfo.rate || "" }
|
||||||
@@ -174,36 +175,47 @@ printf 'time\t%s\n' "$($OMARCHY_PATH/bin/omarchy-battery-remaining-time 2>/dev/n
|
|||||||
}
|
}
|
||||||
|
|
||||||
PanelSeparator { foreground: root.bar.foreground }
|
PanelSeparator { foreground: root.bar.foreground }
|
||||||
PanelSectionHeader { text: "Power profile"; foreground: root.bar.foreground; fontFamily: root.bar.fontFamily }
|
|
||||||
Row {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 6
|
spacing: 12
|
||||||
Repeater {
|
PanelSectionHeader { text: "POWER PROFILE"; foreground: root.bar.foreground; fontFamily: root.bar.fontFamily }
|
||||||
model: root.profiles
|
Row {
|
||||||
CursorPill {
|
width: parent.width
|
||||||
required property var modelData
|
spacing: 6
|
||||||
text: String(modelData).charAt(0).toUpperCase() + String(modelData).slice(1)
|
Repeater {
|
||||||
foreground: root.bar.foreground
|
model: root.profiles
|
||||||
tooltipBackground: root.bar.background
|
CursorPill {
|
||||||
tooltipForeground: root.bar.foreground
|
required property var modelData
|
||||||
fontFamily: root.bar.fontFamily
|
text: String(modelData).charAt(0).toUpperCase() + String(modelData).slice(1)
|
||||||
horizontalPadding: 10
|
foreground: root.bar.foreground
|
||||||
verticalPadding: 6
|
background: Qt.rgba(root.bar.foreground.r, root.bar.foreground.g, root.bar.foreground.b, 0.04)
|
||||||
active: root.activeProfile === modelData
|
tooltipBackground: root.bar.background
|
||||||
onClicked: root.setProfile(modelData)
|
tooltipForeground: root.bar.foreground
|
||||||
|
fontFamily: root.bar.fontFamily
|
||||||
|
horizontalPadding: 10
|
||||||
|
verticalPadding: 6
|
||||||
|
active: root.activeProfile === modelData
|
||||||
|
onClicked: root.setProfile(modelData)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelSeparator { foreground: root.bar.foreground }
|
PanelSeparator { foreground: root.bar.foreground }
|
||||||
PanelSectionHeader { text: "System"; foreground: root.bar.foreground; fontFamily: root.bar.fontFamily }
|
|
||||||
Grid {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
columns: 2
|
spacing: 12
|
||||||
columnSpacing: 14
|
PanelSectionHeader { text: "SYSTEM"; foreground: root.bar.foreground; fontFamily: root.bar.fontFamily }
|
||||||
rowSpacing: 4
|
Grid {
|
||||||
InfoLabel { text: "CPU" } InfoValue { text: root.systemInfo.cpu || "—" }
|
width: parent.width
|
||||||
InfoLabel { text: "Memory" } InfoValue { text: root.systemInfo.memory || "—" }
|
columns: 2
|
||||||
|
columnSpacing: 14
|
||||||
|
rowSpacing: 4
|
||||||
|
InfoLabel { text: "CPU" } InfoValue { text: root.systemInfo.cpu || "—" }
|
||||||
|
InfoLabel { text: "Mem" } InfoValue { text: root.systemInfo.memory || "—" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,7 +233,8 @@ printf 'time\t%s\n' "$($OMARCHY_PATH/bin/omarchy-battery-remaining-time 2>/dev/n
|
|||||||
}
|
}
|
||||||
|
|
||||||
component InfoLabel: Text {
|
component InfoLabel: Text {
|
||||||
color: Qt.darker(root.bar.foreground, 1.4)
|
color: root.bar.foreground
|
||||||
|
opacity: 0.6
|
||||||
font.family: root.bar.fontFamily
|
font.family: root.bar.fontFamily
|
||||||
font.pixelSize: 11
|
font.pixelSize: 11
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user