mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] tab to focus search bar + click on empty area to loose focus
This commit is contained in:
parent
e24310d1a1
commit
b829a2d9f4
4 changed files with 53 additions and 10 deletions
|
@ -108,7 +108,7 @@ Panel {
|
|||
headerBar: RowLayout {
|
||||
SearchBar {
|
||||
id: searchBar
|
||||
width: 100
|
||||
width: 150
|
||||
}
|
||||
|
||||
MaterialToolButton {
|
||||
|
@ -249,8 +249,6 @@ Panel {
|
|||
|
||||
onPressed: {
|
||||
grid.currentIndex = DelegateModel.filteredIndex
|
||||
if(mouse.button == Qt.LeftButton)
|
||||
grid.forceActiveFocus()
|
||||
}
|
||||
|
||||
function sendRemoveRequest()
|
||||
|
@ -357,6 +355,11 @@ Panel {
|
|||
grid.moveCurrentIndexDown()
|
||||
event.accepted = true
|
||||
}
|
||||
else if (event.key == Qt.Key_Tab)
|
||||
{
|
||||
searchBar.forceActiveFocus()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,6 +455,15 @@ Panel {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: {
|
||||
if(mouse.button == Qt.LeftButton)
|
||||
grid.forceActiveFocus()
|
||||
mouse.accepted = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue