Skip to content

Commit

Permalink
Various UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed May 8, 2024
1 parent d68c75f commit 5d4cf65
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 23 deletions.
1 change: 0 additions & 1 deletion qml/DesktopApplication.qml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ ApplicationWindow {

MouseArea {
anchors.fill: parent
z: 99
acceptedButtons: Qt.BackButton | Qt.ForwardButton
onClicked: (mouse) => {
if (mouse.button === Qt.BackButton) {
Expand Down
16 changes: 12 additions & 4 deletions qml/ScreenSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Loader {
anchors.fill: parent

function backAction() {
if (exportDirectory.focus) {
exportDirectory.focus = false
return
}
if (ubertoothPath.focus) {
ubertoothPath.focus = false
return
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions qml/ScreenUbertooth.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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" : ""
Expand Down
11 changes: 7 additions & 4 deletions qml/popups/PopupClearDeviceSeenCache.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

////////////////////////////////////////////////////////////////////////////

Expand All @@ -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"
Expand All @@ -49,7 +52,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // clip
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
Expand All @@ -68,7 +71,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // shadow
autoPaddingEnabled: true
shadowEnabled: true
shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff"
Expand Down
8 changes: 4 additions & 4 deletions qml/popups/PopupClearDeviceStructureCache.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -52,7 +52,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // clip
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
Expand All @@ -71,7 +71,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // shadow
autoPaddingEnabled: true
shadowEnabled: true
shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff"
Expand Down
8 changes: 4 additions & 4 deletions qml/popups/PopupExportDeviceData.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -70,7 +70,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // clip
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
Expand All @@ -89,7 +89,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // shadow
autoPaddingEnabled: true
shadowEnabled: true
shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff"
Expand Down
8 changes: 4 additions & 4 deletions qml/popups/PopupWriteCharacteristic.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -62,7 +62,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // clip
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
Expand All @@ -81,7 +81,7 @@ Popup {
}

layer.enabled: true
layer.effect: MultiEffect {
layer.effect: MultiEffect { // shadow
autoPaddingEnabled: true
shadowEnabled: true
shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff"
Expand Down

0 comments on commit 5d4cf65

Please sign in to comment.