Display the tooltip over the text itself and only if it's truncated
This commit is contained in:
parent
9166a604d6
commit
ef99f02bc7
1 changed files with 6 additions and 10 deletions
|
|
@ -100,6 +100,12 @@ GridView {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.Wrap
|
||||
elide: Text.ElideRight
|
||||
|
||||
// Display a tooltip with the full name if it's truncated
|
||||
ToolTip.text: model.name
|
||||
ToolTip.delay: 1000
|
||||
ToolTip.timeout: 5000
|
||||
ToolTip.visible: parent.hovered && truncated
|
||||
}
|
||||
|
||||
function launchOrResumeSelectedApp()
|
||||
|
|
@ -133,16 +139,6 @@ GridView {
|
|||
}
|
||||
}
|
||||
|
||||
ToolTip {
|
||||
// We don't use the shared tooltip because then the tooltip
|
||||
// would follow the mouse cursor while visible rather than
|
||||
// resetting to invisible as it should
|
||||
text: model.name
|
||||
delay: 1000
|
||||
timeout: 5000
|
||||
visible: parent.hovered
|
||||
}
|
||||
|
||||
Keys.onMenuPressed: {
|
||||
// We must use open() here so the menu is positioned on
|
||||
// the ItemDelegate and not where the mouse cursor is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue