Skip to content

Commit 6057c2f

Browse files
committed
Fix z order for MouseArea
Replace Pane with a rectangle, as it blocks MouseEvents Fixes: #136
1 parent 5d577a0 commit 6057c2f

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

src/gui/qml/FolderDelegate.qml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,20 @@ Pane {
216216
contextMenu.popup();
217217
}
218218

219+
MouseArea {
220+
acceptedButtons: Qt.LeftButton | Qt.RightButton
221+
anchors.fill: parent
222+
223+
onClicked: mouse => {
224+
if (mouse.button === Qt.RightButton) {
225+
contextMenu.popup();
226+
} else {
227+
folderDelegate.ListView.view.currentIndex = folderDelegate.index;
228+
folderDelegate.forceActiveFocus(Qt.TabFocusReason);
229+
}
230+
}
231+
}
232+
219233
SpaceDelegate {
220234
anchors.fill: parent
221235
Layout.fillHeight: true
@@ -308,20 +322,6 @@ Pane {
308322
}
309323
}
310324
}
311-
312-
MouseArea {
313-
acceptedButtons: Qt.LeftButton | Qt.RightButton
314-
anchors.fill: parent
315-
316-
onClicked: mouse => {
317-
if (mouse.button === Qt.RightButton) {
318-
contextMenu.popup();
319-
} else {
320-
folderDelegate.ListView.view.currentIndex = folderDelegate.index;
321-
folderDelegate.forceActiveFocus(Qt.TabFocusReason);
322-
}
323-
}
324-
}
325325
}
326326

327327
Image {

src/gui/spaces/qml/SpaceDelegate.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ Item {
3737
Layout.fillWidth: true
3838
spacing: spaceDelegate.spacing
3939

40-
Pane {
40+
Rectangle {
4141
Accessible.ignored: true
4242
Layout.preferredHeight: normalSize - 20
4343
Layout.preferredWidth: normalSize - 20
4444
Layout.alignment: Qt.AlignTop
4545

46+
color: spaceDelegate.palette.alternateBase
47+
4648
Image {
4749
id: image
4850
anchors.fill: parent

0 commit comments

Comments
 (0)