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 string borderColor: "#808080"
property int textMargin: { property int textMargin: {
// left-right margins for a given cell // left-right margins for a given cell
console.log(appWindow.width);
if(isMobile){ if(isMobile){
return 18; return 10;
} else if(appWindow.width < 890){ } else if(appWindow.width < 890){
return 40; return 32;
} else { } else {
return 64; return 64;
} }
@ -109,13 +108,6 @@ Rectangle {
text: qsTr("Wallet") + translationManager.emptyString text: qsTr("Wallet") + translationManager.emptyString
color: grid.fontColor color: grid.fontColor
} }
}
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -125,6 +117,13 @@ Rectangle {
onClicked: { settingsStateView.state = "Wallet" } onClicked: { settingsStateView.state = "Wallet" }
} }
} }
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
}
Rectangle{ Rectangle{
Layout.preferredWidth: 1 Layout.preferredWidth: 1
Layout.preferredHeight: 32 Layout.preferredHeight: 32
@ -159,13 +158,6 @@ Rectangle {
text: qsTr("Layout") + translationManager.emptyString text: qsTr("Layout") + translationManager.emptyString
color: grid.fontColor color: grid.fontColor
} }
}
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -175,6 +167,13 @@ Rectangle {
onClicked: { settingsStateView.state = "UI" } onClicked: { settingsStateView.state = "UI" }
} }
} }
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
}
Rectangle{ Rectangle{
Layout.preferredWidth: 1 Layout.preferredWidth: 1
Layout.preferredHeight: 32 Layout.preferredHeight: 32
@ -209,13 +208,6 @@ Rectangle {
text: qsTr("Node") + translationManager.emptyString text: qsTr("Node") + translationManager.emptyString
color: grid.fontColor color: grid.fontColor
} }
}
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -225,6 +217,13 @@ Rectangle {
onClicked: { settingsStateView.state = "Node" } onClicked: { settingsStateView.state = "Node" }
} }
} }
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
}
Rectangle{ Rectangle{
Layout.preferredWidth: 1 Layout.preferredWidth: 1
Layout.preferredHeight: 32 Layout.preferredHeight: 32
@ -259,13 +258,6 @@ Rectangle {
text: qsTr("Log") + translationManager.emptyString text: qsTr("Log") + translationManager.emptyString
color: grid.fontColor color: grid.fontColor
} }
}
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -275,6 +267,13 @@ Rectangle {
onClicked: { settingsStateView.state = "Log" } onClicked: { settingsStateView.state = "Log" }
} }
} }
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
}
Rectangle{ Rectangle{
Layout.preferredWidth: 1 Layout.preferredWidth: 1
Layout.preferredHeight: 32 Layout.preferredHeight: 32
@ -309,13 +308,6 @@ Rectangle {
text: qsTr("Info") + translationManager.emptyString text: qsTr("Info") + translationManager.emptyString
color: grid.fontColor color: grid.fontColor
} }
}
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -325,6 +317,13 @@ Rectangle {
onClicked: { settingsStateView.state = "Info" } onClicked: { settingsStateView.state = "Info" }
} }
} }
Rectangle {
color: grid.borderColor
Layout.preferredHeight: 1
Layout.fillWidth: true
}
}
Image { Image {
Layout.preferredWidth: 2 Layout.preferredWidth: 2
Layout.preferredHeight: 32 Layout.preferredHeight: 32