@@ -58,7 +58,8 @@ PanelWindow {
5858
5959 component TopButton: WrapperMouseArea {
6060 id: buttonMouse
61- property alias image: image .source
61+ required property string icon
62+ required property string fallbackText
6263 property bool red: false
6364
6465 hoverEnabled: true
@@ -95,7 +96,20 @@ PanelWindow {
9596 Behavior on color { ColorAnimation { duration: 100 } }
9697 Behavior on border .color { ColorAnimation { duration: 100 } }
9798
98- IconImage { id: image; implicitSize: 22 }
99+ IconImage {
100+ id: image
101+ source: Quickshell .iconPath (buttonMouse .icon , true )
102+ implicitSize: 22
103+ visible: source != " "
104+ }
105+
106+ Text {
107+ id: fallback
108+ text: buttonMouse .fallbackText
109+ color: buttonMouse .red ? " white" : palette .active .buttonText
110+ }
111+
112+ child: image .visible ? image : fallback
99113 }
100114 }
101115
@@ -130,7 +144,8 @@ PanelWindow {
130144 TopButton {
131145 id: copyButton
132146 visible: root .failed
133- image: Quickshell .iconPath (" edit-copy" )
147+ icon: " edit-copy"
148+ fallbackText: " Copy"
134149 onClicked: {
135150 Quickshell .clipboardText = root .errorString ;
136151 copyTooltip .showAction ();
@@ -146,7 +161,8 @@ PanelWindow {
146161 }
147162
148163 TopButton {
149- image: Quickshell .iconPath (" window-close" )
164+ icon: " window-close"
165+ fallbackText: " Close"
150166 red: true
151167 onClicked: {
152168 fadeOutAnim .stop ()
@@ -216,7 +232,8 @@ PanelWindow {
216232 IconImage {
217233 Layout .fillHeight : true
218234 implicitWidth: height
219- source: Quickshell .iconPath (" edit-copy" )
235+ source: Quickshell .iconPath (" edit-copy" , true )
236+ visible: source != " "
220237 }
221238 }
222239 }
0 commit comments