minor ui fixes

This commit is contained in:
vladimir.kuznetsov 2023-08-18 14:14:45 +05:00
parent a40f365a54
commit ddaa5b784d
3 changed files with 25 additions and 11 deletions

View file

@ -17,7 +17,9 @@ Item {
property string textColor: "#d7d8db"
property string descriptionColor: "#878B91"
property string rightImageColor: "#878B91"
property real textOpacity: 1.0
property string rightImageColor: "#d7d8db"
property bool descriptionOnTop: false
@ -67,6 +69,8 @@ Item {
text: root.text
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
opacity: root.textOpacity
Layout.fillWidth: true
lineHeight: root.descriptionOnTop ? parent.descriptionTextLineHeight : parent.textLineHeight
@ -75,14 +79,20 @@ Item {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Behavior on opacity {
PropertyAnimation { duration: 200 }
}
}
CaptionTextType {
id: description
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
text: root.descriptionText
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
opacity: root.textOpacity
visible: root.descriptionText !== ""
@ -94,6 +104,10 @@ Item {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Behavior on opacity {
PropertyAnimation { duration: 200 }
}
}
}
@ -141,9 +155,8 @@ Item {
rightImageBackground.color = rightImage.hoveredColor
} else if (leftImageSource) {
leftImageBackground.color = rightImage.hoveredColor
} else {
background.color = rightImage.hoveredColor
}
root.textOpacity = 0.8
}
onExited: {
@ -151,9 +164,8 @@ Item {
rightImageBackground.color = rightImage.defaultColor
} else if (leftImageSource) {
leftImageBackground.color = rightImage.defaultColor
} else {
background.color = rightImage.defaultColor
}
root.textOpacity = 1
}
onPressedChanged: {
@ -161,9 +173,8 @@ Item {
rightImageBackground.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
} else if (leftImageSource) {
leftImageBackground.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
} else {
background.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
}
root.textOpacity = 0.7
}
onClicked: {

View file

@ -67,6 +67,7 @@ RadioButton {
width: 24
height: 24
}
Image {
source: {
if (showImage) {

View file

@ -81,7 +81,8 @@ And if you don't like the app, all the more support it - the donation will be us
text: qsTr("Card on Patreon")
onClicked: {
clickedFunction: function() {
Qt.openUrlExternally(qsTr("https://www.patreon.com/amneziavpn"))
}
}
@ -121,7 +122,7 @@ And if you don't like the app, all the more support it - the donation will be us
leftImageSource: "qrc:/images/controls/telegram.svg"
clickedFunction: function() {
Qt.openUrlExternally("https://t.me/amnezia_vpn_dev")
Qt.openUrlExternally(qsTr("https://t.me/amnezia_vpn_dev"))
}
}
@ -147,7 +148,7 @@ And if you don't like the app, all the more support it - the donation will be us
leftImageSource: "qrc:/images/controls/github.svg"
clickedFunction: function() {
Qt.openUrlExternally("https://github.com/amnezia-vpn/amnezia-client")
Qt.openUrlExternally(qsTr("https://github.com/amnezia-vpn/amnezia-client"))
}
}
@ -160,6 +161,7 @@ And if you don't like the app, all the more support it - the donation will be us
leftImageSource: "qrc:/images/controls/amnezia.svg"
clickedFunction: function() {
Qt.openUrlExternally(qsTr("amnezia.org/"))
}
}