Make tooltip dialog hidden on the cursor entering the inactive ToolTipArea
REVIEW: 125443
This commit is contained in:
parent
f4c6042b37
commit
64b951fab3
@ -332,9 +332,12 @@ void ToolTip::hoverEnterEvent(QHoverEvent *event)
|
||||
// and ask to keep it open for a bit, so other items get the chance
|
||||
// to update the content before the tooltip hides -- this avoids
|
||||
// flickering
|
||||
tooltipDialogInstance()->keepalive();
|
||||
//FIXME: showToolTip needs to be renamed in sync or something like that
|
||||
showToolTip();
|
||||
// It need to be considered only when other items can deal with tooltip area
|
||||
if (m_active) {
|
||||
tooltipDialogInstance()->keepalive();
|
||||
//FIXME: showToolTip needs to be renamed in sync or something like that
|
||||
showToolTip();
|
||||
}
|
||||
} else {
|
||||
m_showTimer->start(m_interval);
|
||||
}
|
||||
|
@ -85,6 +85,26 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.ToolTipArea {
|
||||
width: 300
|
||||
height: 50
|
||||
|
||||
active: false
|
||||
|
||||
mainText: "A"
|
||||
subText: "B"
|
||||
|
||||
Rectangle {
|
||||
color: "red"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.fill: parent
|
||||
text: "tooltip exists but inactive"
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.ToolTipArea {
|
||||
width: 300
|
||||
height: 50
|
||||
|
Loading…
Reference in New Issue
Block a user