From cb9a25006ce5cfa73c2b50fb2587cc3f62a1f358 Mon Sep 17 00:00:00 2001 From: Garegin866 Date: Tue, 12 Mar 2024 00:02:47 +0400 Subject: [PATCH] - Removed additional focus frames for buttons inside text fields. - For mobile platforms, disabled auto-focus on the first element when navigating on the page. --- client/ui/qml/Components/ShareConnectionDrawer.qml | 2 +- client/ui/qml/Controls2/PageType.qml | 4 +++- client/ui/qml/Controls2/TextFieldWithHeaderType.qml | 1 + client/ui/qml/Pages2/PageSettingsServerInfo.qml | 1 + client/ui/qml/Pages2/PageShare.qml | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/ui/qml/Components/ShareConnectionDrawer.qml b/client/ui/qml/Components/ShareConnectionDrawer.qml index d337242f..1f7db930 100644 --- a/client/ui/qml/Components/ShareConnectionDrawer.qml +++ b/client/ui/qml/Components/ShareConnectionDrawer.qml @@ -40,7 +40,7 @@ DrawerType2 { Connections { target: root - + enabled: !GC.isMobile() function onOpened() { header.forceActiveFocus() } diff --git a/client/ui/qml/Controls2/PageType.qml b/client/ui/qml/Controls2/PageType.qml index 706a32e1..2ca75e9d 100644 --- a/client/ui/qml/Controls2/PageType.qml +++ b/client/ui/qml/Controls2/PageType.qml @@ -2,6 +2,8 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts +import "../Config" + Item { id: root @@ -32,6 +34,6 @@ Item { } } repeat: false // Stop the timer after one trigger - running: true // Start the timer + running: !GC.isMobile() // Start the timer } } diff --git a/client/ui/qml/Controls2/TextFieldWithHeaderType.qml b/client/ui/qml/Controls2/TextFieldWithHeaderType.qml index 606aa83e..6069bc38 100644 --- a/client/ui/qml/Controls2/TextFieldWithHeaderType.qml +++ b/client/ui/qml/Controls2/TextFieldWithHeaderType.qml @@ -137,6 +137,7 @@ Item { // textColor: "#D7D8DB" // borderWidth: 0 + focusPolicy: Qt.NoFocus text: root.buttonText imageSource: root.buttonImageSource diff --git a/client/ui/qml/Pages2/PageSettingsServerInfo.qml b/client/ui/qml/Pages2/PageSettingsServerInfo.qml index dc17d98d..1ace3c3e 100644 --- a/client/ui/qml/Pages2/PageSettingsServerInfo.qml +++ b/client/ui/qml/Pages2/PageSettingsServerInfo.qml @@ -93,6 +93,7 @@ PageType { Connections { target: serverNameEditDrawer + enabled: !GC.isMobile() function onOpened() { serverName.textField.forceActiveFocus() } diff --git a/client/ui/qml/Pages2/PageShare.qml b/client/ui/qml/Pages2/PageShare.qml index 44fe145f..70b03d7f 100644 --- a/client/ui/qml/Pages2/PageShare.qml +++ b/client/ui/qml/Pages2/PageShare.qml @@ -648,6 +648,7 @@ PageType { Connections { target: clientNameEditDrawer + enabled: !GC.isMobile() function onOpened() { clientNameEditor.textField.forceActiveFocus() }