From 3fedfdd3d13e1aeec749fbf5f3483b81bda382f6 Mon Sep 17 00:00:00 2001 From: jkito <belter@riseup.net> Date: Thu, 1 Aug 2024 23:27:50 +0530 Subject: [PATCH] gui: use an Image item to set the on/off icon this uses the contentItem property of RoundButton to use an Image item and set the power button as on/off changing from Icon to Image allows to use the mipmap property, which should improve the image quality --- gui/components/StatusBox.qml | 7 +++---- gui/components/VPNState.qml | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml index 14e842b1..d17c2fe0 100644 --- a/gui/components/StatusBox.qml +++ b/gui/components/StatusBox.qml @@ -151,11 +151,10 @@ Item { HoverHandler { cursorShape: Qt.PointingHandCursor } - icon { + contentItem: Image { + anchors.fill: parent source: Theme.buttonDisconnected - height: 48 - width: 48 - color: "transparent" + mipmap: true } onClicked: { diff --git a/gui/components/VPNState.qml b/gui/components/VPNState.qml index 2589b8d9..eb6b40a2 100644 --- a/gui/components/VPNState.qml +++ b/gui/components/VPNState.qml @@ -63,7 +63,7 @@ StateGroup { PropertyChanges { target: toggleVPN enabled: false - icon.source: Theme.buttonConnecting + contentItem.source: Theme.buttonConnecting } PropertyChanges { target: systray @@ -94,7 +94,7 @@ StateGroup { PropertyChanges { target: toggleVPN enabled: true - icon.source: Theme.buttonDisconnected + contentItem.source: Theme.buttonDisconnected Accessible.name: qsTr("Turn on") } PropertyChanges { @@ -130,7 +130,7 @@ StateGroup { PropertyChanges { target: toggleVPN enabled: true - icon.source: Theme.buttonConnected + contentItem.source: Theme.buttonConnected Accessible.name: qsTr("Turn off") } PropertyChanges { @@ -168,7 +168,7 @@ StateGroup { PropertyChanges { target: toggleVPN enabled: true - icon.source: Theme.buttonConnecting + contentItem.source: Theme.buttonConnecting Accessible.name: qsTr("Cancel") } PropertyChanges { @@ -207,7 +207,7 @@ StateGroup { } PropertyChanges { target: toggleVPN - icon.source: Theme.buttonConnecting + contentItem.source: Theme.buttonConnecting Accessible.name: qsTr("Cancel") } PropertyChanges { -- GitLab