Merge pull request #14223 from Ultimaker/CURA-9522

[CURA-9522] Fix hovering on last popup items triggering popup to close
This commit is contained in:
Casper Lamboo 2023-01-06 14:38:39 +01:00 committed by GitHub
commit 0d5f482e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@ Instead we'll use a pop-up which doesn't seem to have that problem. */
Cura.MenuItem Cura.MenuItem
{ {
id: materialBrandMenu id: materialBrandMenu
height: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height
overrideShowArrow: true overrideShowArrow: true
property var materialTypesModel property var materialTypesModel

View File

@ -12,11 +12,13 @@ Popup
{ {
id: materialBrandSubMenu id: materialBrandSubMenu
bottomPadding: UM.Theme.getSize("thin_margin").height // There is a bug where hovering the bottom half of the last element causes the popup to close.
// Undo this commit if you find a fix.
bottomPadding: -UM.Theme.getSize("thin_margin").height
topPadding: UM.Theme.getSize("thin_margin").height topPadding: UM.Theme.getSize("thin_margin").height
implicitWidth: scrollViewContent.width + scrollbar.width + leftPadding + rightPadding implicitWidth: scrollViewContent.width + scrollbar.width + leftPadding + rightPadding
implicitHeight: scrollViewContent.height + bottomPadding + topPadding implicitHeight: scrollViewContent.height + bottomPadding + topPadding + (2 * UM.Theme.getSize("thin_margin").height)
// offset position relative to the parent // offset position relative to the parent
property int implicitX: parent.width - UM.Theme.getSize("default_lining").width property int implicitX: parent.width - UM.Theme.getSize("default_lining").width