minor ui fixes
This commit is contained in:
parent
a40f365a54
commit
ddaa5b784d
3 changed files with 25 additions and 11 deletions
|
@ -17,7 +17,9 @@ Item {
|
||||||
|
|
||||||
property string textColor: "#d7d8db"
|
property string textColor: "#d7d8db"
|
||||||
property string descriptionColor: "#878B91"
|
property string descriptionColor: "#878B91"
|
||||||
property string rightImageColor: "#878B91"
|
property real textOpacity: 1.0
|
||||||
|
|
||||||
|
property string rightImageColor: "#d7d8db"
|
||||||
|
|
||||||
property bool descriptionOnTop: false
|
property bool descriptionOnTop: false
|
||||||
|
|
||||||
|
@ -67,6 +69,8 @@ Item {
|
||||||
text: root.text
|
text: root.text
|
||||||
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
|
color: root.descriptionOnTop ? root.descriptionColor : root.textColor
|
||||||
|
|
||||||
|
opacity: root.textOpacity
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
lineHeight: root.descriptionOnTop ? parent.descriptionTextLineHeight : parent.textLineHeight
|
lineHeight: root.descriptionOnTop ? parent.descriptionTextLineHeight : parent.textLineHeight
|
||||||
|
@ -75,14 +79,20 @@ Item {
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
PropertyAnimation { duration: 200 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CaptionTextType {
|
CaptionTextType {
|
||||||
id: description
|
id: description
|
||||||
|
|
||||||
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
|
|
||||||
text: root.descriptionText
|
text: root.descriptionText
|
||||||
|
color: root.descriptionOnTop ? root.textColor : root.descriptionColor
|
||||||
|
|
||||||
|
opacity: root.textOpacity
|
||||||
|
|
||||||
visible: root.descriptionText !== ""
|
visible: root.descriptionText !== ""
|
||||||
|
|
||||||
|
@ -94,6 +104,10 @@ Item {
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
PropertyAnimation { duration: 200 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,9 +155,8 @@ Item {
|
||||||
rightImageBackground.color = rightImage.hoveredColor
|
rightImageBackground.color = rightImage.hoveredColor
|
||||||
} else if (leftImageSource) {
|
} else if (leftImageSource) {
|
||||||
leftImageBackground.color = rightImage.hoveredColor
|
leftImageBackground.color = rightImage.hoveredColor
|
||||||
} else {
|
|
||||||
background.color = rightImage.hoveredColor
|
|
||||||
}
|
}
|
||||||
|
root.textOpacity = 0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: {
|
onExited: {
|
||||||
|
@ -151,9 +164,8 @@ Item {
|
||||||
rightImageBackground.color = rightImage.defaultColor
|
rightImageBackground.color = rightImage.defaultColor
|
||||||
} else if (leftImageSource) {
|
} else if (leftImageSource) {
|
||||||
leftImageBackground.color = rightImage.defaultColor
|
leftImageBackground.color = rightImage.defaultColor
|
||||||
} else {
|
|
||||||
background.color = rightImage.defaultColor
|
|
||||||
}
|
}
|
||||||
|
root.textOpacity = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressedChanged: {
|
onPressedChanged: {
|
||||||
|
@ -161,9 +173,8 @@ Item {
|
||||||
rightImageBackground.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
|
rightImageBackground.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
|
||||||
} else if (leftImageSource) {
|
} else if (leftImageSource) {
|
||||||
leftImageBackground.color = pressed ? rightImage.pressedColor : entered ? rightImage.hoveredColor : rightImage.defaultColor
|
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: {
|
onClicked: {
|
||||||
|
|
|
@ -67,6 +67,7 @@ RadioButton {
|
||||||
width: 24
|
width: 24
|
||||||
height: 24
|
height: 24
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: {
|
source: {
|
||||||
if (showImage) {
|
if (showImage) {
|
||||||
|
|
|
@ -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")
|
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"
|
leftImageSource: "qrc:/images/controls/telegram.svg"
|
||||||
|
|
||||||
clickedFunction: function() {
|
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"
|
leftImageSource: "qrc:/images/controls/github.svg"
|
||||||
|
|
||||||
clickedFunction: function() {
|
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"
|
leftImageSource: "qrc:/images/controls/amnezia.svg"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
|
Qt.openUrlExternally(qsTr("amnezia.org/"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue