From 5d4cf65c35bba856a97e3b34c38c563e9b5d4f9d Mon Sep 17 00:00:00 2001 From: Emeric Date: Wed, 8 May 2024 17:07:22 +0200 Subject: [PATCH] Various UI improvements --- qml/DesktopApplication.qml | 1 - qml/ScreenSettings.qml | 16 ++++++++++++---- qml/ScreenUbertooth.qml | 4 ++-- qml/popups/PopupClearDeviceSeenCache.qml | 11 +++++++---- qml/popups/PopupClearDeviceStructureCache.qml | 8 ++++---- qml/popups/PopupExportDeviceData.qml | 8 ++++---- qml/popups/PopupWriteCharacteristic.qml | 8 ++++---- 7 files changed, 33 insertions(+), 23 deletions(-) diff --git a/qml/DesktopApplication.qml b/qml/DesktopApplication.qml index 58f3409..3945bc2 100644 --- a/qml/DesktopApplication.qml +++ b/qml/DesktopApplication.qml @@ -181,7 +181,6 @@ ApplicationWindow { MouseArea { anchors.fill: parent - z: 99 acceptedButtons: Qt.BackButton | Qt.ForwardButton onClicked: (mouse) => { if (mouse.button === Qt.BackButton) { diff --git a/qml/ScreenSettings.qml b/qml/ScreenSettings.qml index 7951027..e8d9504 100644 --- a/qml/ScreenSettings.qml +++ b/qml/ScreenSettings.qml @@ -29,6 +29,10 @@ Loader { anchors.fill: parent function backAction() { + if (exportDirectory.focus) { + exportDirectory.focus = false + return + } if (ubertoothPath.focus) { ubertoothPath.focus = false return @@ -559,7 +563,8 @@ Loader { height: 48 color: Theme.colorForeground - TextField_FolderDialog { // exportDirectory + TextField_FolderDialog { + id: exportDirectory anchors.left: parent.left anchors.leftMargin: Theme.componentMargin anchors.right: parent.right @@ -827,10 +832,11 @@ Loader { } } - ButtonSolid { + ButtonFlat { anchors.right: parent.right anchors.rightMargin: Theme.componentMargin anchors.verticalCenter: parent.verticalCenter + height: 34 text: qsTr("Clear cache") onClicked: { @@ -882,10 +888,11 @@ Loader { } } - ButtonSolid { + ButtonFlat { anchors.right: parent.right anchors.rightMargin: Theme.componentMargin anchors.verticalCenter: parent.verticalCenter + height: 34 text: qsTr("Clear cache") onClicked: { @@ -1001,7 +1008,8 @@ Loader { height: 48 color: Theme.colorForeground - TextField_FileDialog { // ubertoothPath + TextField_FileDialog { + id: ubertoothPath anchors.left: parent.left anchors.leftMargin: Theme.componentMargin anchors.right: parent.right diff --git a/qml/ScreenUbertooth.qml b/qml/ScreenUbertooth.qml index 2a28043..3c7bf96 100644 --- a/qml/ScreenUbertooth.qml +++ b/qml/ScreenUbertooth.qml @@ -261,8 +261,8 @@ Loader { } } - ButtonSolid { - height: 28 + ButtonFlat { + height: 30 color: ubertooth.hardwareAvailable ? Theme.colorSuccess: Theme.colorWarning text: ubertooth.hardwareAvailable ? qsTr("hardware ready") : qsTr("hardware not ready") source: ubertooth.hardwareAvailable ? "qrc:/assets/icons/material-symbols/check_circle.svg" : "" diff --git a/qml/popups/PopupClearDeviceSeenCache.qml b/qml/popups/PopupClearDeviceSeenCache.qml index 4ff76c7..92bff2e 100644 --- a/qml/popups/PopupClearDeviceSeenCache.qml +++ b/qml/popups/PopupClearDeviceSeenCache.qml @@ -9,12 +9,15 @@ Popup { x: ((appWindow.width / 2) - (width / 2)) y: ((appWindow.height / 2) - (height / 2) - (appHeader.height)) + width: 720 padding: 0 + margins: 0 modal: true focus: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + parent: Overlay.overlay //////////////////////////////////////////////////////////////////////////// @@ -32,14 +35,14 @@ Popup { Item { anchors.fill: parent - Rectangle { // titleArea + Rectangle { // title area anchors.left: parent.left anchors.right: parent.right height: 96 color: Theme.colorPrimary } - Rectangle { + Rectangle { // border anchors.fill: parent radius: Theme.componentRadius color: "transparent" @@ -49,7 +52,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // clip maskEnabled: true maskInverted: false maskThresholdMin: 0.5 @@ -68,7 +71,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // shadow autoPaddingEnabled: true shadowEnabled: true shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff" diff --git a/qml/popups/PopupClearDeviceStructureCache.qml b/qml/popups/PopupClearDeviceStructureCache.qml index dce7fe8..feafc78 100644 --- a/qml/popups/PopupClearDeviceStructureCache.qml +++ b/qml/popups/PopupClearDeviceStructureCache.qml @@ -35,14 +35,14 @@ Popup { Item { anchors.fill: parent - Rectangle { // titleArea + Rectangle { // title area anchors.left: parent.left anchors.right: parent.right height: 96 color: Theme.colorPrimary } - Rectangle { + Rectangle { // border anchors.fill: parent radius: Theme.componentRadius color: "transparent" @@ -52,7 +52,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // clip maskEnabled: true maskInverted: false maskThresholdMin: 0.5 @@ -71,7 +71,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // shadow autoPaddingEnabled: true shadowEnabled: true shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff" diff --git a/qml/popups/PopupExportDeviceData.qml b/qml/popups/PopupExportDeviceData.qml index 7754efe..a270782 100644 --- a/qml/popups/PopupExportDeviceData.qml +++ b/qml/popups/PopupExportDeviceData.qml @@ -53,14 +53,14 @@ Popup { Item { anchors.fill: parent - Rectangle { // titleArea + Rectangle { // title area anchors.left: parent.left anchors.right: parent.right height: 96 color: Theme.colorPrimary } - Rectangle { + Rectangle { // border anchors.fill: parent radius: Theme.componentRadius color: "transparent" @@ -70,7 +70,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // clip maskEnabled: true maskInverted: false maskThresholdMin: 0.5 @@ -89,7 +89,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // shadow autoPaddingEnabled: true shadowEnabled: true shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff" diff --git a/qml/popups/PopupWriteCharacteristic.qml b/qml/popups/PopupWriteCharacteristic.qml index f1a72f8..e2c9576 100644 --- a/qml/popups/PopupWriteCharacteristic.qml +++ b/qml/popups/PopupWriteCharacteristic.qml @@ -45,14 +45,14 @@ Popup { Item { anchors.fill: parent - Rectangle { // titleArea + Rectangle { // title area anchors.left: parent.left anchors.right: parent.right height: 96 color: Theme.colorPrimary } - Rectangle { + Rectangle { // border anchors.fill: parent radius: Theme.componentRadius color: "transparent" @@ -62,7 +62,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // clip maskEnabled: true maskInverted: false maskThresholdMin: 0.5 @@ -81,7 +81,7 @@ Popup { } layer.enabled: true - layer.effect: MultiEffect { + layer.effect: MultiEffect { // shadow autoPaddingEnabled: true shadowEnabled: true shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff"