mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 16:25:54 +00:00
Display the tooltip over the text itself and only if it's truncated
This commit is contained in:
parent
9166a604d6
commit
ef99f02bc7
@ -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…
x
Reference in New Issue
Block a user