Fix the hover for SettingItem

This was broken due to the switch to Qt6

Fixes CURA-10375 and fixes #14790
This commit is contained in:
Jaime van Kessel 2023-03-08 16:23:56 +01:00
parent 7a15e5098f
commit aec8a9ad49
No known key found for this signature in database
GPG Key ID: C85F7A3AF1BAA7C4

View File

@ -115,7 +115,16 @@ Item
onExited:
{
if (controlContainer.item && controlContainer.item.hovered)
if (controlContainer.children[0] && controlContainer.children[0].hovered)
{
return
}
// Don't trigger the hide if either of the nested buttons is hidden. This is caused by a bug in QT
// Documentation claims that nested mouse events don't trigger the onExit, but this is only true if they
// have a *direct* parent child relationship. In this case there are rows and other visual layouts in
// between which messes this up.
if(linkedSettingIcon.hovered || revertButton.hovered || inheritButton.hovered)
{
return
}
@ -129,10 +138,7 @@ Item
interval: 500
repeat: false
onTriggered:
{
base.showTooltip(base.createTooltipText())
}
onTriggered: base.showTooltip(base.createTooltipText())
}
UM.Label
@ -150,7 +156,7 @@ Item
color: UM.Theme.getColor("setting_control_text")
opacity: (definition.visible) ? 1 : 0.5
// emphasize the setting if it has a value in the user or quality profile
// Emphasize the setting if it has a value in the user or quality profile
font: base.doQualityUserSettingEmphasis && base.stackLevel !== undefined && base.stackLevel <= 1 ? UM.Theme.getFont("default_italic") : UM.Theme.getFont("default")
}