refactor: adjust tooltip

This commit is contained in:
JPratama7 2025-08-31 10:54:13 +07:00
parent 65601cb855
commit 9bb5241e49
No known key found for this signature in database
GPG key ID: CD3EB7D0490C5F4B

View file

@ -21,10 +21,6 @@ Rectangle {
radius: Math.round(Style.radiusM * scaling) radius: Math.round(Style.radiusM * scaling)
color: Color.mSurfaceVariant color: Color.mSurfaceVariant
Component.onCompleted: {
Logger.log("Taskbar", "Taskbar loaded")
}
Row { Row {
id: taskbarRow id: taskbarRow
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -62,7 +58,6 @@ Rectangle {
} }
MouseArea { MouseArea {
id: appMouseArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@ -85,23 +80,15 @@ Rectangle {
} }
} }
} }
onEntered: taskbarTooltip.show()
onExited: taskbarTooltip.hide()
}
ToolTip { NTooltip {
parent: appIcon id: taskbarTooltip
visible: appMouseArea.containsMouse text: taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown App"
delay: 500 target: taskbarItem
text: taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown App" positionAbove: Settings.data.bar.position === "bottom"
background: Rectangle {
color: Color.mSurface
border.color: Color.mOutline
radius: Style.radiusS * root.scaling
}
contentItem: Label {
color: Color.mOnSurface
font.pixelSize: Style.fontSizeS * root.scaling
text: taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown App"
}
}
} }
} }
} }