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

This commit is contained in:
Sander Ferdinand 2018-08-05 23:54:30 +02:00
parent 39f2b99c7b
commit 0a3d75d197

View file

@ -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