fixed a lot of quickshell problems

This commit is contained in:
Tomas Rivera
2026-03-10 18:38:32 +01:00
parent b9e3f35abe
commit 25dc8507b8
16 changed files with 145 additions and 32 deletions
+36 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
/*import QtQuick
BarButton {
id: root
@@ -17,4 +17,39 @@ BarButton {
}
}
}
}*/
import QtQuick
BarButton {
id: root
// NEW property: stores the intended image path
property string iconSource: ""
// optional: alias for external access
property alias mirror: img.mirror
implicitWidth: 24
implicitHeight: 24
Image {
id: img
anchors.fill: parent
smooth: false
// Use the property, fallback if empty
//source: root.iconSource ? root.iconSource : "../assets/noaudio.png"
Component.onCompleted: {
source: typeof root.iconSource === "string" && root.iconSource.length > 0
? root.iconSource
: "../assets/noaudio.png"
}
onSourceChanged: {
console.log("ClickableIcon: iconSource =", root.iconSource, " -> Image.source =", img.source);
}
scale: root.containsMouse ? 0.9 : 1
Behavior on scale {
NumberAnimation { duration: 70 }
}
}
}