mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:26:00 +08:00
Merge pull request #11674 from Ultimaker/CURA-9039_combobox_open_out_of_window
[CURA-9039] fix combobox scrolling out of view
This commit is contained in:
commit
fcfc47920f
@ -148,6 +148,14 @@ UM.PreferencesPage
|
|||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onPositionChanged: {
|
||||||
|
// This removes focus from items when scrolling.
|
||||||
|
// This fixes comboboxes staying open and scrolling container
|
||||||
|
if (!activeFocus) {
|
||||||
|
forceActiveFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column
|
Column
|
||||||
|
@ -188,13 +188,15 @@ Item
|
|||||||
}
|
}
|
||||||
clip: true
|
clip: true
|
||||||
cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item.
|
cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item.
|
||||||
ScrollBar.vertical: UM.ScrollBar { id: scrollBar }
|
ScrollBar.vertical: UM.ScrollBar
|
||||||
|
{
|
||||||
onContentYChanged: {
|
id: scrollBar
|
||||||
// This removes focus from SettingItems when scrolling.
|
onPositionChanged: {
|
||||||
// This fixes comboboxes staying open and scrolling out of the settingView.
|
// This removes focus from items when scrolling.
|
||||||
if (!scrollBar.activeFocus) {
|
// This fixes comboboxes staying open and scrolling container
|
||||||
scrollBar.forceActiveFocus();
|
if (!activeFocus) {
|
||||||
|
forceActiveFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user