fix positioning in modules

This commit is contained in:
lucy 2026-01-03 20:16:51 +01:00
parent 6f72c99bf3
commit 33906413b4
5 changed files with 6 additions and 7 deletions

View File

@ -69,7 +69,6 @@ Item {
opacity: 0.7 opacity: 0.7
color: Colors.foreground color: Colors.foreground
text: isCharging ? timeToFull.toFixed(1) + "h to full" : timeToEmpty.toFixed(1) + "h left" text: isCharging ? timeToFull.toFixed(1) + "h to full" : timeToEmpty.toFixed(1) + "h left"
onTextChanged: console.log(UPower.displayDevice.percentage)
} }
} }
} }

View File

@ -36,7 +36,7 @@ Item {
font.pixelSize: Settings.fontSize - 2 font.pixelSize: Settings.fontSize - 2
color: Colors.foreground color: Colors.foreground
text: Qt.formatDateTime(clockDate.date, "d.m.yy") text: Qt.formatDateTime(clockDate.date, "dd.MM.yy")
SystemClock { SystemClock {
id: clockDate id: clockDate

View File

@ -6,7 +6,7 @@ import "../../"
Item { Item {
id: root id: root
width: 50 width: powerLayout.implicitWidth
implicitHeight: 34 implicitHeight: 34
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent

View File

@ -6,7 +6,7 @@ Item {
clip: true clip: true
// This was already correct in your last file, but keep it this way! // This was already correct in your last file, but keep it this way!
implicitWidth: layout.implicitWidth implicitWidth: layout.implicitWidth < 0 ? 0 : layout.implicitWidth
implicitHeight: 30 implicitHeight: 30
// Hide if empty so we don't have a 50px gap for nothing // Hide if empty so we don't have a 50px gap for nothing

View File

@ -29,11 +29,11 @@ Item {
function getVolumeIcon() { function getVolumeIcon() {
// Safety check: if Pipewire is dead or sink is missing // Safety check: if Pipewire is dead or sink is missing
if (!sink) if (!sink)
return "audio-volume-muted-blocking"; return "volume_mute";
// If muted, show the hush icon // If muted, show the hush icon
if (sink.audio.muted) if (sink.audio.muted)
return "audio-volume-muted"; return "volume_mute";
// Volume is usually 0.0 to 1.0 (0% to 100%) // Volume is usually 0.0 to 1.0 (0% to 100%)
const vol = sink.audio.volume; const vol = sink.audio.volume;
@ -65,7 +65,7 @@ Item {
color: Colors.foreground color: Colors.foreground
font.family: Settings.font font.family: Settings.font
font.pixelSize: Settings.fontSize font.pixelSize: Settings.fontSize
text: Pipewire.ready ? Math.round(root.sink.audio.volume * 100) + "%" : "0%" text: Pipewire.ready ? root.sink.audio.volume.toFixed(2) + "%" : "0%"
} }
Icons { Icons {
id: icon id: icon