diff --git a/client/ui/qml/DefaultVpn/Components/SettingsButtonNoBorder.qml b/client/ui/qml/DefaultVpn/Components/SettingsButtonNoBorder.qml index 0a293023..06c963b1 100644 --- a/client/ui/qml/DefaultVpn/Components/SettingsButtonNoBorder.qml +++ b/client/ui/qml/DefaultVpn/Components/SettingsButtonNoBorder.qml @@ -30,30 +30,35 @@ Button { } } - contentItem: RowLayout { - anchors.fill: parent - implicitHeight: childrenRect.height + contentItem: Item { + implicitWidth: content.implicitWidth + implicitHeight: content.implicitHeight - Header3TextType { - id: headerText - Layout.fillWidth: true - Layout.leftMargin: 8 - Layout.topMargin: 19 - Layout.bottomMargin: 19 - horizontalAlignment: Text.AlignLeft - text: buttonText - color: Style.color.black - } + RowLayout { + id: content + anchors.fill: parent - Item { Layout.fillWidth: true } + Header3TextType { + id: headerText + Layout.fillWidth: true + Layout.leftMargin: 8 + Layout.topMargin: 19 + Layout.bottomMargin: 19 + horizontalAlignment: Text.AlignLeft + text: buttonText + color: Style.color.black + } - Image { - Layout.rightMargin: 8 - source: "qrc:/images/controls/chevron-right.svg" - layer { - enabled: true - effect: ColorOverlay { - color: Style.color.black + Item { Layout.fillWidth: true } + + Image { + Layout.rightMargin: 8 + source: "qrc:/images/controls/chevron-right.svg" + layer { + enabled: true + effect: ColorOverlay { + color: Style.color.black + } } } } diff --git a/client/ui/qml/DefaultVpn/Pages/PageSettings.qml b/client/ui/qml/DefaultVpn/Pages/PageSettings.qml index adedfba0..bd5f53c0 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageSettings.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageSettings.qml @@ -43,9 +43,6 @@ Page { ColumnLayout { Layout.fillWidth: true Layout.topMargin: 24 - Layout.leftMargin: 8 - Layout.rightMargin: 8 - spacing: 2 SettingsButtonNoBorder { buttonText: qsTr("Language") diff --git a/client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml b/client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml index e81961ae..9be00643 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageSettingsApiAvailableCountries.qml @@ -57,7 +57,6 @@ Page { ScrollBar.vertical: ScrollBar {} delegate: Item { - id: menuContentDelegate required property string countryName required property string countryCode required property string countryImageCode @@ -142,4 +141,4 @@ Page { } } } -} \ No newline at end of file +} diff --git a/client/ui/qml/DefaultVpn/Pages/PageSettingsLanguage.qml b/client/ui/qml/DefaultVpn/Pages/PageSettingsLanguage.qml index 5241a938..6f75e73c 100644 --- a/client/ui/qml/DefaultVpn/Pages/PageSettingsLanguage.qml +++ b/client/ui/qml/DefaultVpn/Pages/PageSettingsLanguage.qml @@ -50,51 +50,85 @@ Page { model: LanguageModel currentIndex: LanguageModel.currentLanguageIndex - spacing: 8 ScrollBar.vertical: ScrollBar {} delegate: Item { - id: languageItem required property string languageName required property int languageIndex required property int index - width: languageListView.width - height: 60 + implicitWidth: languageListView.width + implicitHeight: languageItem.implicitHeight visible: languageName === "English" || languageName === "Русский" - Rectangle { + RadioButton { + id: languageItem + anchors.fill: parent - color: radioButton.checked ? Style.color.gray1 : Style.color.transparent - radius: 8 + anchors.rightMargin: 16 + anchors.leftMargin: 16 - RowLayout { - anchors.fill: parent - anchors.margins: 8 + ButtonGroup.group: languageButtonGroup - RadioButton { - id: radioButton - ButtonGroup.group: languageButtonGroup - checked: languageIndex === LanguageModel.currentLanguageIndex + checked: languageIndex === LanguageModel.currentLanguageIndex - text: languageName - font.pixelSize: 18 - Layout.fillWidth: true - Layout.alignment: Qt.AlignVCenter + indicator: Item { } - onClicked: { - if (languageIndex !== LanguageModel.currentLanguageIndex) { - LanguageModel.changeLanguage(languageIndex); - PageController.closePage(); - } + contentItem: Item { + id: contentContainer + + anchors.left: parent.left + anchors.right: parent.right + + implicitHeight: content.implicitHeight + + Rectangle { + anchors.fill: parent + radius: 8 + color: languageItem.checked ? Style.color.gray1 : Style.color.transparent + } + + RowLayout { + id: content + anchors.fill: parent + + Header3TextType { + Layout.fillWidth: true + Layout.leftMargin: 8 + Layout.topMargin: 19 + Layout.bottomMargin: 19 + + text: languageName + + color: languageItem.hovered ? Style.color.gray9 : Style.color.black + } + + Image { + Layout.rightMargin: 8 + width: 24 + height: 24 + source: "qrc:/images/controls/check.svg" + visible: languageItem.checked } } } + + onClicked: { + if (languageIndex !== LanguageModel.currentLanguageIndex) { + LanguageModel.changeLanguage(languageIndex); + PageController.closePage(); + } + } + + MouseArea { + anchors.fill: languageItem + cursorShape: Qt.PointingHandCursor + enabled: false + } } } } - } }