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

@ -113,8 +113,7 @@ void InstallController::installServer(DockerContainer container, QJsonObject &co
ContainerProps::containerHumanNames().value(container) + tr(" is already installed on the server. "); ContainerProps::containerHumanNames().value(container) + tr(" is already installed on the server. ");
} }
if (installedContainers.size() > 1) { if (installedContainers.size() > 1) {
finishMessage += tr("\nAlready installed containers were found on the server. " finishMessage += tr("\nAdded containers that were already installed on the server");
"All installed containers have been added to the application");
} }
if (errorCode == ErrorCode::NoError) { if (errorCode == ErrorCode::NoError) {

View file

@ -114,7 +114,7 @@ DrawerType {
BasicButtonType { BasicButtonType {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8 Layout.topMargin: 24
defaultColor: "transparent" defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08) hoveredColor: Qt.rgba(1, 1, 1, 0.08)
@ -123,7 +123,7 @@ DrawerType {
textColor: "#D7D8DB" textColor: "#D7D8DB"
borderWidth: 1 borderWidth: 1
text: qsTr("Show content") text: qsTr("Show connection settings")
onClicked: { onClicked: {
configContentDrawer.visible = true configContentDrawer.visible = true

View file

@ -23,6 +23,9 @@ Item {
image: backButtonImage image: backButtonImage
imageColor: "#D7D8DB" imageColor: "#D7D8DB"
implicitWidth: 40
implicitHeight: 40
onClicked: { onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") { if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction() backButtonFunction()

View file

@ -90,6 +90,9 @@ Button {
anchors.centerIn: parent anchors.centerIn: parent
Image { Image {
Layout.preferredHeight: 20
Layout.preferredWidth: 20
source: root.imageSource source: root.imageSource
visible: root.imageSource === "" ? false : true visible: root.imageSource === "" ? false : true

View file

@ -24,6 +24,8 @@ Item {
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg" property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
property string rootButtonImageColor: "#D7D8DB" property string rootButtonImageColor: "#D7D8DB"
property string rootButtonBackgroundColor: "#1C1D21" property string rootButtonBackgroundColor: "#1C1D21"
property string rootButtonBackgroundHoveredColor: "#1C1D21"
property string rootButtonBackgroundPressedColor: "#1C1D21"
property string rootButtonHoveredBorderColor: "#494B50" property string rootButtonHoveredBorderColor: "#494B50"
property string rootButtonDefaultBorderColor: "#2C2D30" property string rootButtonDefaultBorderColor: "#2C2D30"
@ -71,6 +73,10 @@ Item {
Behavior on border.color { Behavior on border.color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
} }
Behavior on color {
PropertyAnimation { duration: 200 }
}
} }
RowLayout { RowLayout {
@ -112,6 +118,9 @@ Item {
ImageButtonType { ImageButtonType {
Layout.rightMargin: 16 Layout.rightMargin: 16
implicitWidth: 40
implicitHeight: 40
hoverEnabled: false hoverEnabled: false
image: rootButtonImage image: rootButtonImage
imageColor: rootButtonImageColor imageColor: rootButtonImageColor
@ -126,12 +135,20 @@ Item {
onEntered: { onEntered: {
if (menu.visible === false) { if (menu.visible === false) {
rootButtonBackground.border.color = rootButtonHoveredBorderColor rootButtonBackground.border.color = rootButtonHoveredBorderColor
rootButtonBackground.color = rootButtonBackgroundHoveredColor
} }
} }
onExited: { onExited: {
if (menu.visible === false) { if (menu.visible === false) {
rootButtonBackground.border.color = rootButtonDefaultBorderColor rootButtonBackground.border.color = rootButtonDefaultBorderColor
rootButtonBackground.color = rootButtonBackgroundColor
}
}
onPressed: {
if (menu.visible === false) {
rootButtonBackground.color = pressed ? rootButtonBackgroundPressedColor : entered ? rootButtonHoveredBorderColor : rootButtonDefaultBorderColor
} }
} }

View file

@ -31,6 +31,9 @@ Item {
ImageButtonType { ImageButtonType {
id: headerActionButton id: headerActionButton
implicitWidth: 40
implicitHeight: 40
image: root.actionButtonImage image: root.actionButtonImage
imageColor: "#D7D8DB" imageColor: "#D7D8DB"

View file

@ -36,6 +36,9 @@ Item {
ImageButtonType { ImageButtonType {
id: headerActionButton id: headerActionButton
implicitWidth: 40
implicitHeight: 40
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
image: root.actionButtonImage image: root.actionButtonImage

View file

@ -15,11 +15,8 @@ Button {
property string imageColor: "#878B91" property string imageColor: "#878B91"
property string disableImageColor: "#2C2D30" property string disableImageColor: "#2C2D30"
property int backGroudRadius: 12 property alias backgroundColor: background.color
property int implicitSize: 40 property alias backgroundRadius: background.radius
implicitWidth: implicitSize
implicitHeight: implicitSize
hoverEnabled: true hoverEnabled: true
@ -34,7 +31,6 @@ Button {
id: background id: background
anchors.fill: parent anchors.fill: parent
radius: backGroudRadius
color: { color: {
if (root.enabled) { if (root.enabled) {
if (root.pressed) { if (root.pressed) {
@ -44,6 +40,7 @@ Button {
} }
return defaultColor return defaultColor
} }
radius: 12
Behavior on color { Behavior on color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
} }

View file

@ -119,6 +119,9 @@ Item {
ImageButtonType { ImageButtonType {
id: rightImage id: rightImage
implicitWidth: 40
implicitHeight: 40
hoverEnabled: false hoverEnabled: false
image: rightImageSource image: rightImageSource
imageColor: rightImageColor imageColor: rightImageColor

View file

@ -6,7 +6,7 @@ Text {
color: "#D7D8DB" color: "#D7D8DB"
font.pixelSize: 16 font.pixelSize: 16
font.weight: 500 font.weight: 600
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
wrapMode: Text.WordWrap wrapMode: Text.WordWrap

View file

@ -23,6 +23,9 @@ Popup {
image: "qrc:/images/svg/close_black_24dp.svg" image: "qrc:/images/svg/close_black_24dp.svg"
imageColor: "#D7D8DB" imageColor: "#D7D8DB"
implicitWidth: 40
implicitHeight: 40
onClicked: { onClicked: {
PageController.goToDrawerRootPage() PageController.goToDrawerRootPage()
} }

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: { onClicked: {
if (buttonContent.state === "collapsed") { if (buttonContent.state === "collapsed") {
buttonContent.state = "expanded" buttonContent.state = "expanded"
@ -202,6 +216,7 @@ PageType {
spacing: 0 spacing: 0
Header1TextType { Header1TextType {
id: collapsedButtonHeader
Layout.maximumWidth: buttonContent.width - 48 - 18 - 12 // todo Layout.maximumWidth: buttonContent.width - 48 - 18 - 12 // todo
maximumLineCount: 2 maximumLineCount: 2
@ -209,15 +224,33 @@ PageType {
text: root.defaultServerName text: root.defaultServerName
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
Behavior on opacity {
PropertyAnimation { duration: 200 }
}
} }
Image { ImageButtonType {
Layout.preferredWidth: 18 id: collapsedButtonChevron
Layout.preferredHeight: 18
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" rootButtonImageColor: "#0E0E11"
rootButtonBackgroundColor: "#D7D8DB" rootButtonBackgroundColor: "#D7D8DB"
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
rootButtonHoveredBorderColor: "transparent" rootButtonHoveredBorderColor: "transparent"
rootButtonPressedBorderColor: "transparent" rootButtonDefaultBorderColor: "transparent"
rootButtonTextTopMargin: 8 rootButtonTextTopMargin: 8
rootButtonTextBottomMargin: 8 rootButtonTextBottomMargin: 8
@ -463,6 +498,8 @@ PageType {
DividerType { DividerType {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: 0
Layout.rightMargin: 0
} }
} }
} }

View file

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

View file

@ -219,13 +219,14 @@ PageType {
if (accessTypeSelector.currentIndex !== 0) { if (accessTypeSelector.currentIndex !== 0) {
shareConnectionDrawer.headerText = qsTr("Accessing ") + serverSelector.text 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 serverSelector.menuVisible = false
} }
Component.onCompleted: { Component.onCompleted: {
handler() handler()
serverSelector.severSelectorIndexChanged()
} }
function handler() { function handler() {
@ -240,12 +241,14 @@ PageType {
DropDownType { DropDownType {
id: protocolSelector id: protocolSelector
visible: accessTypeSelector.currentIndex === 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 16 Layout.topMargin: 16
drawerHeight: 0.5 drawerHeight: 0.5
descriptionText: qsTr("Protocols") descriptionText: qsTr("Protocol")
headerText: qsTr("Protocol") headerText: qsTr("Protocol")
listView: ListViewWithRadioButtonType { listView: ListViewWithRadioButtonType {