refactor: adjust tooltip
This commit is contained in:
parent
65601cb855
commit
9bb5241e49
1 changed files with 8 additions and 21 deletions
|
|
@ -21,10 +21,6 @@ Rectangle {
|
|||
radius: Math.round(Style.radiusM * scaling)
|
||||
color: Color.mSurfaceVariant
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("Taskbar", "Taskbar loaded")
|
||||
}
|
||||
|
||||
Row {
|
||||
id: taskbarRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -62,7 +58,6 @@ Rectangle {
|
|||
}
|
||||
|
||||
MouseArea {
|
||||
id: appMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
|
@ -85,23 +80,15 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
onEntered: taskbarTooltip.show()
|
||||
onExited: taskbarTooltip.hide()
|
||||
}
|
||||
|
||||
ToolTip {
|
||||
parent: appIcon
|
||||
visible: appMouseArea.containsMouse
|
||||
delay: 500
|
||||
NTooltip {
|
||||
id: taskbarTooltip
|
||||
text: taskbarItem.modelData.title || taskbarItem.modelData.appId || "Unknown App"
|
||||
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"
|
||||
}
|
||||
}
|
||||
target: taskbarItem
|
||||
positionAbove: Settings.data.bar.position === "bottom"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue