From 29bef052c7bf3fead0afa76a1e2c0af890c329d7 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Sat, 26 Aug 2023 10:08:50 +0300 Subject: [PATCH] minor ui fixes --- CMakeLists.txt | 2 +- client/ui/qml/Components/ShareConnectionDrawer.qml | 2 +- client/ui/qml/Controls2/CheckBoxType.qml | 2 +- client/ui/qml/Controls2/DropDownType.qml | 12 ++++++++---- client/ui/qml/Controls2/HorizontalRadioButton.qml | 11 ++++++----- client/ui/qml/Controls2/ProgressBarType.qml | 2 +- client/ui/qml/Controls2/SwitcherType.qml | 9 +++++---- client/ui/qml/Controls2/TabButtonType.qml | 8 +++++++- client/ui/qml/Controls2/TabImageButtonType.qml | 9 ++++++++- client/ui/qml/Controls2/TextAreaType.qml | 2 +- client/ui/qml/Controls2/TextFieldWithHeaderType.qml | 2 +- client/ui/qml/Pages2/PageHome.qml | 8 +++++++- client/ui/qml/Pages2/PageProtocolRaw.qml | 2 +- client/ui/qml/Pages2/PageSettings.qml | 4 +++- client/ui/qml/Pages2/PageShare.qml | 9 ++++++--- client/ui/qml/Pages2/PageStart.qml | 8 -------- 16 files changed, 57 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7231c56..4560bdd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(${PROJECT} VERSION 4.0.2.1 DESCRIPTION "AmneziaVPN" HOMEPAGE_URL "https://amnezia.org/" ) -set(RELEASE_DATE "2023-08-16") +set(RELEASE_DATE "2023-08-25") set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") diff --git a/client/ui/qml/Components/ShareConnectionDrawer.qml b/client/ui/qml/Components/ShareConnectionDrawer.qml index 368d503a..05684ba8 100644 --- a/client/ui/qml/Components/ShareConnectionDrawer.qml +++ b/client/ui/qml/Components/ShareConnectionDrawer.qml @@ -163,7 +163,7 @@ DrawerType { height: 24 color: "#D7D8DB" - selectionColor: "#412102" + selectionColor: "#633303" selectedTextColor: "#D7D8DB" font.pixelSize: 16 diff --git a/client/ui/qml/Controls2/CheckBoxType.qml b/client/ui/qml/Controls2/CheckBoxType.qml index 2724a30c..1ad3b412 100644 --- a/client/ui/qml/Controls2/CheckBoxType.qml +++ b/client/ui/qml/Controls2/CheckBoxType.qml @@ -21,7 +21,7 @@ CheckBox { property string defaultBorderColor: "#D7D8DB" property string checkedBorderColor: "#FBB26A" - property string checkedBorderDisabledColor: "#5A330C" + property string checkedBorderDisabledColor: "#402102" property string checkedImageColor: "#FBB26A" property string pressedImageColor: "#A85809" diff --git a/client/ui/qml/Controls2/DropDownType.qml b/client/ui/qml/Controls2/DropDownType.qml index 17151630..c21fa48f 100644 --- a/client/ui/qml/Controls2/DropDownType.qml +++ b/client/ui/qml/Controls2/DropDownType.qml @@ -27,7 +27,9 @@ Item { property string rootButtonDefaultBorderColor: "#2C2D30" property string rootButtonPressedBorderColor: "#D7D8DB" - property int rootButtonTextMargins: 16 + property int rootButtonTextLeftMargins: 16 + property int rootButtonTextTopMargin: 16 + property int rootButtonTextBottomMargin: 16 property real drawerHeight: 0.9 property Component listView @@ -76,9 +78,9 @@ Item { spacing: 0 ColumnLayout { - Layout.leftMargin: rootButtonTextMargins - Layout.topMargin: rootButtonTextMargins - Layout.bottomMargin: rootButtonTextMargins + Layout.leftMargin: rootButtonTextLeftMargins + Layout.topMargin: rootButtonTextTopMargin + Layout.bottomMargin: rootButtonTextBottomMargin LabelTextType { Layout.fillWidth: true @@ -104,6 +106,8 @@ Item { } ImageButtonType { + Layout.rightMargin: 16 + hoverEnabled: false image: rootButtonImage imageColor: rootButtonImageColor diff --git a/client/ui/qml/Controls2/HorizontalRadioButton.qml b/client/ui/qml/Controls2/HorizontalRadioButton.qml index 1ac5840a..81cc8ec0 100644 --- a/client/ui/qml/Controls2/HorizontalRadioButton.qml +++ b/client/ui/qml/Controls2/HorizontalRadioButton.qml @@ -75,19 +75,20 @@ RadioButton { ColumnLayout { id: content anchors.fill: parent - spacing: 16 + spacing: 0 ButtonTextType { text: root.text color: root.enabled ? root.textColor : root.textDisabledColor Layout.fillWidth: true - Layout.rightMargin: 16 - Layout.leftMargin: 16 - Layout.topMargin: 16 - Layout.bottomMargin: 16 + Layout.rightMargin: 24 + Layout.leftMargin: 24 + Layout.topMargin: 12 + Layout.bottomMargin: 12 horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter } } diff --git a/client/ui/qml/Controls2/ProgressBarType.qml b/client/ui/qml/Controls2/ProgressBarType.qml index 183c3736..e642c3eb 100644 --- a/client/ui/qml/Controls2/ProgressBarType.qml +++ b/client/ui/qml/Controls2/ProgressBarType.qml @@ -8,7 +8,7 @@ ProgressBar { implicitHeight: 4 background: Rectangle { - color: "#412102" + color: "#633303" } contentItem: Item { diff --git a/client/ui/qml/Controls2/SwitcherType.qml b/client/ui/qml/Controls2/SwitcherType.qml index aca5ba0b..ee7372f5 100644 --- a/client/ui/qml/Controls2/SwitcherType.qml +++ b/client/ui/qml/Controls2/SwitcherType.qml @@ -14,13 +14,13 @@ Switch { property string textColor: "#D7D8DB" property string textDisabledColor: "#878B91" - property string checkedIndicatorColor: "#412102" + property string checkedIndicatorColor: "#633303" property string defaultIndicatorColor: "transparent" - property string checkedDisabledIndicatorColor: "#5A330C" + property string checkedDisabledIndicatorColor: "#402102" - property string checkedIndicatorBorderColor: "#412102" + property string checkedIndicatorBorderColor: "#633303" property string defaultIndicatorBorderColor: "#494B50" - property string checkedDisabledIndicatorBorderColor: "#5A330C" + property string checkedDisabledIndicatorBorderColor: "#402102" property string checkedInnerCircleColor: "#FBB26A" property string defaultInnerCircleColor: "#D7D8DB" @@ -40,6 +40,7 @@ Switch { anchors.left: content.right anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 4 implicitWidth: 52 implicitHeight: 32 diff --git a/client/ui/qml/Controls2/TabButtonType.qml b/client/ui/qml/Controls2/TabButtonType.qml index 4699dfcd..f8011f0d 100644 --- a/client/ui/qml/Controls2/TabButtonType.qml +++ b/client/ui/qml/Controls2/TabButtonType.qml @@ -4,7 +4,7 @@ import QtQuick.Controls TabButton { id: root - property string hoveredColor: "#412102" + property string hoveredColor: "#633303" property string defaultColor: "#2C2D30" property string selectedColor: "#FBB26A" @@ -39,6 +39,12 @@ TabButton { } } + MouseArea { + anchors.fill: background + cursorShape: Qt.PointingHandCursor + enabled: false + } + contentItem: Text { anchors.fill: background height: 24 diff --git a/client/ui/qml/Controls2/TabImageButtonType.qml b/client/ui/qml/Controls2/TabImageButtonType.qml index 06b77e6a..4d745a0b 100644 --- a/client/ui/qml/Controls2/TabImageButtonType.qml +++ b/client/ui/qml/Controls2/TabImageButtonType.qml @@ -4,7 +4,7 @@ import QtQuick.Controls TabButton { id: root - property string hoveredColor: "#412102" + property string hoveredColor: "#633303" property string defaultColor: "#D7D8DB" property string selectedColor: "#FBB26A" @@ -18,7 +18,14 @@ TabButton { icon.color: isSelected ? selectedColor : defaultColor background: Rectangle { + id: background anchors.fill: parent color: "transparent" } + + MouseArea { + anchors.fill: background + cursorShape: Qt.PointingHandCursor + enabled: false + } } diff --git a/client/ui/qml/Controls2/TextAreaType.qml b/client/ui/qml/Controls2/TextAreaType.qml index 9958f2e9..a75ea55d 100644 --- a/client/ui/qml/Controls2/TextAreaType.qml +++ b/client/ui/qml/Controls2/TextAreaType.qml @@ -29,7 +29,7 @@ Rectangle { anchors.bottomMargin: 16 color: "#D7D8DB" - selectionColor: "#412102" + selectionColor: "#633303" selectedTextColor: "#D7D8DB" placeholderTextColor: "#878B91" diff --git a/client/ui/qml/Controls2/TextFieldWithHeaderType.qml b/client/ui/qml/Controls2/TextFieldWithHeaderType.qml index 3f31c224..048a564d 100644 --- a/client/ui/qml/Controls2/TextFieldWithHeaderType.qml +++ b/client/ui/qml/Controls2/TextFieldWithHeaderType.qml @@ -74,7 +74,7 @@ Item { placeholderText: root.textFieldPlaceholderText placeholderTextColor: "#494B50" - selectionColor: "#412102" + selectionColor: "#633303" selectedTextColor: "#D7D8DB" font.pixelSize: 16 diff --git a/client/ui/qml/Pages2/PageHome.qml b/client/ui/qml/Pages2/PageHome.qml index b756511b..c5add5d8 100644 --- a/client/ui/qml/Pages2/PageHome.qml +++ b/client/ui/qml/Pages2/PageHome.qml @@ -70,6 +70,8 @@ PageType { Layout.topMargin: 24 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + spacing: 0 + Header1TextType { text: root.defaultServerName } @@ -78,6 +80,8 @@ PageType { Layout.preferredWidth: 18 Layout.preferredHeight: 18 + Layout.leftMargin: 12 + source: "qrc:/images/controls/chevron-down.svg" } } @@ -152,7 +156,8 @@ PageType { rootButtonBackgroundColor: "#D7D8DB" rootButtonHoveredBorderColor: "transparent" rootButtonPressedBorderColor: "transparent" - rootButtonTextMargins: 8 + rootButtonTextTopMargin: 8 + rootButtonTextBottomMargin: 8 text: root.defaultContainerName textColor: "#0E0E11" @@ -303,6 +308,7 @@ PageType { ImageButtonType { image: "qrc:/images/controls/settings.svg" + imageColor: "#D7D8DB" implicitWidth: 56 implicitHeight: 56 diff --git a/client/ui/qml/Pages2/PageProtocolRaw.qml b/client/ui/qml/Pages2/PageProtocolRaw.qml index e82b0ff5..5c70b1c0 100644 --- a/client/ui/qml/Pages2/PageProtocolRaw.qml +++ b/client/ui/qml/Pages2/PageProtocolRaw.qml @@ -142,7 +142,7 @@ PageType { height: 24 color: "#D7D8DB" - selectionColor: "#412102" + selectionColor: "#633303" selectedTextColor: "#D7D8DB" font.pixelSize: 16 diff --git a/client/ui/qml/Pages2/PageSettings.qml b/client/ui/qml/Pages2/PageSettings.qml index f430a004..6c088a70 100644 --- a/client/ui/qml/Pages2/PageSettings.qml +++ b/client/ui/qml/Pages2/PageSettings.qml @@ -26,9 +26,11 @@ PageType { anchors.left: parent.left anchors.right: parent.right + spacing: 0 + HeaderType { Layout.fillWidth: true - Layout.topMargin: 20 + Layout.topMargin: 24 Layout.rightMargin: 16 Layout.leftMargin: 16 diff --git a/client/ui/qml/Pages2/PageShare.qml b/client/ui/qml/Pages2/PageShare.qml index 120e04fc..135c7fbc 100644 --- a/client/ui/qml/Pages2/PageShare.qml +++ b/client/ui/qml/Pages2/PageShare.qml @@ -106,9 +106,11 @@ PageType { anchors.rightMargin: 16 anchors.leftMargin: 16 + spacing: 0 + HeaderType { Layout.fillWidth: true - Layout.topMargin: 20 + Layout.topMargin: 24 headerText: qsTr("VPN Access") } @@ -161,6 +163,7 @@ PageType { ParagraphTextType { Layout.fillWidth: true Layout.topMargin: 24 + Layout.bottomMargin: 24 text: accessTypeSelector.currentIndex === 0 ? qsTr("VPN access without the ability to manage the server") : qsTr("Full access to server") @@ -171,7 +174,7 @@ PageType { id: serverSelector Layout.fillWidth: true - Layout.topMargin: 24 + Layout.topMargin: 16 drawerHeight: 0.4375 @@ -385,7 +388,7 @@ PageType { BasicButtonType { Layout.fillWidth: true - Layout.topMargin: 32 + Layout.topMargin: 40 enabled: shareButtonEnabled diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index 5c2a13df..e4cc02ee 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -163,14 +163,6 @@ PageType { } } - MouseArea { - anchors.fill: tabBar - anchors.leftMargin: shareTabButton.visible ? 96 : 128 - anchors.rightMargin: shareTabButton.visible ? 96 : 128 - cursorShape: Qt.PointingHandCursor - enabled: false - } - BusyIndicatorType { id: busyIndicator anchors.centerIn: parent