Skip to content
Snippets Groups Projects
Commit 3fedfdd3 authored by jkito's avatar jkito :skull:
Browse files

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
parent ccf0bfa4
No related branches found
No related tags found
1 merge request!239obfs4: stop obfs4 client and proxy in a go routine
......@@ -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: {
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment