Dock: one tooltip per app instead of a shared tooltip. avoid a few glitches when hovering.
This commit is contained in:
parent
ac43b6d78a
commit
1bb1015fdf
1 changed files with 8 additions and 7 deletions
|
|
@ -194,12 +194,6 @@ Variants {
|
|||
height: parent.height - (Style.marginM * 2 * scaling)
|
||||
anchors.centerIn: parent
|
||||
|
||||
NTooltip {
|
||||
id: appTooltip
|
||||
visible: false
|
||||
positionAbove: true
|
||||
}
|
||||
|
||||
function getAppIcon(toplevel: Toplevel): string {
|
||||
if (!toplevel)
|
||||
return ""
|
||||
|
|
@ -226,6 +220,14 @@ Variants {
|
|||
property string appId: modelData ? modelData.appId : ""
|
||||
property string appTitle: modelData ? modelData.title : ""
|
||||
|
||||
// Individual tooltip for this app
|
||||
NTooltip {
|
||||
id: appTooltip
|
||||
target: appButton
|
||||
positionAbove: true
|
||||
visible: false
|
||||
}
|
||||
|
||||
// The icon with better quality settings
|
||||
Image {
|
||||
id: appIcon
|
||||
|
|
@ -282,7 +284,6 @@ Variants {
|
|||
onEntered: {
|
||||
anyAppHovered = true
|
||||
const appName = appButton.appTitle || appButton.appId || "Unknown"
|
||||
appTooltip.target = appButton
|
||||
appTooltip.text = appName.length > 40 ? appName.substring(0, 37) + "..." : appName
|
||||
appTooltip.isVisible = true
|
||||
if (autoHide) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue