mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 12:24:26 +02:00
Be a bit more efficient
This commit is contained in:
parent
93cf399fd6
commit
e01e7cc7bc
1 changed files with 18 additions and 44 deletions
|
@ -30,6 +30,16 @@ Item {
|
||||||
color: "black"
|
color: "black"
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
radius: popupRadius
|
radius: popupRadius
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent;
|
||||||
|
hoverEnabled: true;
|
||||||
|
acceptedButtons: Qt.LeftButton;
|
||||||
|
propagateComposedEvents: false;
|
||||||
|
onClicked: {
|
||||||
|
letterbox.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: textContainer;
|
id: textContainer;
|
||||||
|
@ -38,6 +48,14 @@ Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: popupRadius
|
radius: popupRadius
|
||||||
color: "white"
|
color: "white"
|
||||||
|
|
||||||
|
// Prevent dismissing the popup by clicking on the textContainer
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent;
|
||||||
|
hoverEnabled: true;
|
||||||
|
propagateComposedEvents: false;
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: contentContainer
|
id: contentContainer
|
||||||
width: parent.width - 50
|
width: parent.width - 50
|
||||||
|
@ -135,48 +153,4 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Left gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.right: textContainer.left;
|
|
||||||
anchors.top: textContainer.top;
|
|
||||||
anchors.bottom: textContainer.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton;
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Right gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: textContainer.left;
|
|
||||||
anchors.right: parent.left;
|
|
||||||
anchors.top: textContainer.top;
|
|
||||||
anchors.bottom: textContainer.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton;
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Top gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.top: parent.top;
|
|
||||||
anchors.bottom: textContainer.top;
|
|
||||||
acceptedButtons: Qt.LeftButton;
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Bottom gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.top: textContainer.bottom;
|
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton;
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue