From e1ac6c34dcc5278634c0953d4ceffe48ca881b86 Mon Sep 17 00:00:00 2001 From: waaake Date: Thu, 6 Feb 2025 09:28:05 +0530 Subject: [PATCH 1/4] [ui] Inspector 3D: Added mouse area to allow forcing focus to the parent item when clicking --- meshroom/ui/qml/Viewer3D/Inspector3D.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/ui/qml/Viewer3D/Inspector3D.qml b/meshroom/ui/qml/Viewer3D/Inspector3D.qml index 43a08095c1..f9b841896e 100644 --- a/meshroom/ui/qml/Viewer3D/Inspector3D.qml +++ b/meshroom/ui/qml/Viewer3D/Inspector3D.qml @@ -355,6 +355,14 @@ FloatingPane { } } + MouseArea { + anchors.fill: parent + onClicked: { + /// Steal focus from anything that may have + mediaListView.forceActiveFocus(); + } + } + model: SortFilterDelegateModel { model: mediaLibrary.model sortRole: "" From 1a08c31fb45bacd256f1a9b0a2b8397667fb56ef Mon Sep 17 00:00:00 2001 From: waaake Date: Thu, 6 Feb 2025 09:28:26 +0530 Subject: [PATCH 2/4] [ui] ImageGallery: Added mouse area to allow forcing focus to the parent item when clicking --- meshroom/ui/qml/ImageGallery/ImageGallery.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/ui/qml/ImageGallery/ImageGallery.qml b/meshroom/ui/qml/ImageGallery/ImageGallery.qml index 5510b9bb36..d49e5060b6 100644 --- a/meshroom/ui/qml/ImageGallery/ImageGallery.qml +++ b/meshroom/ui/qml/ImageGallery/ImageGallery.qml @@ -830,8 +830,15 @@ Panel { } Item { + id: spacer Layout.fillHeight: true Layout.fillWidth: true + MouseArea { + anchors.fill: parent + onClicked: { + spacer.forceActiveFocus(); + } + } } MaterialToolLabelButton { From 1931ce05ceec17c0c3f259e2dbc786ffe04945c4 Mon Sep 17 00:00:00 2001 From: waaake Date: Thu, 6 Feb 2025 09:34:21 +0530 Subject: [PATCH 3/4] [ui] NodeEditor: Added mouse area to allow forcing focus to the parent item when clicking --- meshroom/ui/qml/GraphEditor/NodeEditor.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/ui/qml/GraphEditor/NodeEditor.qml b/meshroom/ui/qml/GraphEditor/NodeEditor.qml index a208d22ee1..d6fb84fa95 100644 --- a/meshroom/ui/qml/GraphEditor/NodeEditor.qml +++ b/meshroom/ui/qml/GraphEditor/NodeEditor.qml @@ -255,6 +255,13 @@ Panel { id: placeholder_component Item { + id: panel + MouseArea { + anchors.fill: parent + onClicked: { + panel.forceActiveFocus(); + } + } Column { anchors.centerIn: parent MaterialLabel { From c1e28b07e9bac4491099b1852ad8150f5c4688a1 Mon Sep 17 00:00:00 2001 From: waaake Date: Thu, 6 Feb 2025 09:34:49 +0530 Subject: [PATCH 4/4] [ui] Application: Added mouse area on menu bar area to allow forcing focus to the parent item when clicking --- meshroom/ui/qml/Application.qml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/meshroom/ui/qml/Application.qml b/meshroom/ui/qml/Application.qml index a27c1a5c6e..6b8960a01d 100644 --- a/meshroom/ui/qml/Application.qml +++ b/meshroom/ui/qml/Application.qml @@ -927,6 +927,13 @@ Page { } Rectangle { + id: menuSpacer + MouseArea { + anchors.fill: parent + onClicked: { + menuSpacer.forceActiveFocus(); + } + } Layout.fillWidth: true Layout.fillHeight: true color: Qt.darker(activePalette.window, 1.15) @@ -973,6 +980,12 @@ Page { } Rectangle { + MouseArea { + anchors.fill: parent + onClicked: { + menuSpacer.forceActiveFocus(); + } + } Layout.fillWidth: true Layout.fillHeight: true color: Qt.darker(activePalette.window, 1.15) @@ -1007,6 +1020,7 @@ Page { // Cache Folder RowLayout { spacing: 0 + width: parent.width MaterialToolButton { font.pointSize: 8 text: MaterialIcons.folder_open @@ -1021,6 +1035,17 @@ Page { color: Qt.darker(palette.text, 1.2) background: Item {} } + + Item { + Layout.fillWidth: true + Layout.fillHeight: true + MouseArea { + anchors.fill: parent + onClicked: { + footer.forceActiveFocus(); + } + } + } } }