Merge pull request #359 from amnezia-vpn/bugfix/minor-ui-fixes-4-version

minor ui fixes
This commit is contained in:
Nethius 2023-10-03 21:48:30 +03:00 committed by GitHub
commit 70e6a3d303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 94 additions and 23 deletions

View file

@ -81,6 +81,20 @@ PageType {
}
}
onEntered: {
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.hoveredColor
collapsedButtonHeader.opacity = 0.8
}
onExited: {
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.defaultColor
collapsedButtonHeader.opacity = 1
}
onPressedChanged: {
collapsedButtonChevron.backgroundColor = pressed ? collapsedButtonChevron.pressedColor : entered ? collapsedButtonChevron.hoveredColor : collapsedButtonChevron.defaultColor
collapsedButtonHeader.opacity = 0.7
}
onClicked: {
if (buttonContent.state === "collapsed") {
buttonContent.state = "expanded"
@ -202,6 +216,7 @@ PageType {
spacing: 0
Header1TextType {
id: collapsedButtonHeader
Layout.maximumWidth: buttonContent.width - 48 - 18 - 12 // todo
maximumLineCount: 2
@ -209,15 +224,33 @@ PageType {
text: root.defaultServerName
horizontalAlignment: Qt.AlignHCenter
Behavior on opacity {
PropertyAnimation { duration: 200 }
}
}
Image {
Layout.preferredWidth: 18
Layout.preferredHeight: 18
ImageButtonType {
id: collapsedButtonChevron
Layout.leftMargin: 12
Layout.leftMargin: 8
source: "qrc:/images/controls/chevron-down.svg"
hoverEnabled: false
image: "qrc:/images/controls/chevron-down.svg"
imageColor: "#d7d8db"
icon.width: 18
icon.height: 18
backgroundRadius: 16
horizontalPadding: 4
topPadding: 4
bottomPadding: 3
onClicked: {
if (buttonContent.state === "collapsed") {
buttonContent.state = "expanded"
}
}
}
}
@ -279,8 +312,10 @@ PageType {
rootButtonImageColor: "#0E0E11"
rootButtonBackgroundColor: "#D7D8DB"
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
rootButtonHoveredBorderColor: "transparent"
rootButtonPressedBorderColor: "transparent"
rootButtonDefaultBorderColor: "transparent"
rootButtonTextTopMargin: 8
rootButtonTextBottomMargin: 8
@ -463,6 +498,8 @@ PageType {
DividerType {
Layout.fillWidth: true
Layout.leftMargin: 0
Layout.rightMargin: 0
}
}
}

View file

@ -62,6 +62,7 @@ PageType {
id: header
implicitWidth: parent.width
headerTextMaximumLineCount: 10
headerText: qsTr("What is the level of internet control in your region?")
}
@ -145,14 +146,13 @@ PageType {
Item {
implicitWidth: 1
implicitHeight: 1
implicitHeight: 54
}
BasicButtonType {
id: continueButton
implicitWidth: parent.width
anchors.topMargin: 24
text: qsTr("Continue")

View file

@ -219,13 +219,14 @@ PageType {
if (accessTypeSelector.currentIndex !== 0) {
shareConnectionDrawer.headerText = qsTr("Accessing ") + serverSelector.text
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
shareConnectionDrawer.configContentHeaderText = qsTr("File with accessing settings to ") + serverSelector.text
}
serverSelector.menuVisible = false
}
Component.onCompleted: {
handler()
serverSelector.severSelectorIndexChanged()
}
function handler() {
@ -240,12 +241,14 @@ PageType {
DropDownType {
id: protocolSelector
visible: accessTypeSelector.currentIndex === 0
Layout.fillWidth: true
Layout.topMargin: 16
drawerHeight: 0.5
descriptionText: qsTr("Protocols")
descriptionText: qsTr("Protocol")
headerText: qsTr("Protocol")
listView: ListViewWithRadioButtonType {