aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-08-05 23:54:30 +0200
committerSander Ferdinand <sa.ferdinand@gmail.com>2018-08-05 23:55:38 +0200
commit0a3d75d197dbc6fd8a5dfd056f3b91cb2d90791b (patch)
tree7754a7a9fc2005d0454cc6aad2b974a533d993c2
parent39f2b99c7b43a0ad7c04fc60cf80abcd9cee8918 (diff)
downloadmonzero-gui-0a3d75d197dbc6fd8a5dfd056f3b91cb2d90791b.tar.gz
monzero-gui-0a3d75d197dbc6fd8a5dfd056f3b91cb2d90791b.tar.xz
monzero-gui-0a3d75d197dbc6fd8a5dfd056f3b91cb2d90791b.zip
Fixes a particular hard to track bug where ColumnLayout considers MouseArea as part of its height/width after the parent StackView changed state a few times
-rw-r--r--pages/settings/Navbar.qml85
1 files changed, 42 insertions, 43 deletions
diff --git a/pages/settings/Navbar.qml b/pages/settings/Navbar.qml
index 4f4736f3..4c1c5d2a 100644
--- a/pages/settings/Navbar.qml
+++ b/pages/settings/Navbar.qml
@@ -60,11 +60,10 @@ Rectangle {
property string borderColor: "#808080"
property int textMargin: {
// left-right margins for a given cell
- console.log(appWindow.width);
if(isMobile){
- return 18;
+ return 10;
} else if(appWindow.width < 890){
- return 40;
+ return 32;
} else {
return 64;
}
@@ -109,6 +108,14 @@ Rectangle {
text: qsTr("Wallet") + translationManager.emptyString
color: grid.fontColor
}
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+
+ onClicked: { settingsStateView.state = "Wallet" }
+ }
}
Rectangle {
@@ -116,14 +123,6 @@ Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
}
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
-
- onClicked: { settingsStateView.state = "Wallet" }
- }
}
Rectangle{
Layout.preferredWidth: 1
@@ -159,6 +158,14 @@ Rectangle {
text: qsTr("Layout") + translationManager.emptyString
color: grid.fontColor
}
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+
+ onClicked: { settingsStateView.state = "UI" }
+ }
}
Rectangle {
@@ -166,14 +173,6 @@ Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
}
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
-
- onClicked: { settingsStateView.state = "UI" }
- }
}
Rectangle{
Layout.preferredWidth: 1
@@ -209,6 +208,14 @@ Rectangle {
text: qsTr("Node") + translationManager.emptyString
color: grid.fontColor
}
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+
+ onClicked: { settingsStateView.state = "Node" }
+ }
}
Rectangle {
@@ -216,14 +223,6 @@ Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
}
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
-
- onClicked: { settingsStateView.state = "Node" }
- }
}
Rectangle{
Layout.preferredWidth: 1
@@ -259,6 +258,14 @@ Rectangle {
text: qsTr("Log") + translationManager.emptyString
color: grid.fontColor
}
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+
+ onClicked: { settingsStateView.state = "Log" }
+ }
}
Rectangle {
@@ -266,14 +273,6 @@ Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
}
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
-
- onClicked: { settingsStateView.state = "Log" }
- }
}
Rectangle{
Layout.preferredWidth: 1
@@ -309,6 +308,14 @@ Rectangle {
text: qsTr("Info") + translationManager.emptyString
color: grid.fontColor
}
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+
+ onClicked: { settingsStateView.state = "Info" }
+ }
}
Rectangle {
@@ -316,14 +323,6 @@ Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
}
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
-
- onClicked: { settingsStateView.state = "Info" }
- }
}
Image {
Layout.preferredWidth: 2