Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions panels/dock/multitaskview/package/multitaskview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,38 @@ AppletItem {
scale: Panel.rootObject.dockItemMaxSize * 9 / 14 / Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE
// 9:14 (iconSize/dockHeight)
sourceSize: Qt.size(Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE, Dock.MAX_DOCK_TASKMANAGER_ICON_SIZE)
Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, Applet.rootObject.height / 2)
toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
toolTip.open()
}
}

Timer {
id: toolTipShowTimer
interval: 50
onTriggered: {
var point = toggleworkspace.mapToItem(null, toggleworkspace.width / 2, toggleworkspace.height / 2)
toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
toolTip.open()
}
TapHandler {
acceptedButtons: Qt.LeftButton
onTapped: {
}

MouseArea {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

换成MouseArea由什么好处么,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

保持根启动器一致把, 启动器之前用TapHandler 出现过BUG, 这是启动器的注视The TapHandler receives the event after visibleChange, which causes the state to be inverted after synchronization,
// causing the launchpad to be displayed again. However, the MouseArea receives the event before visibleChange.

id: mouseHandler
anchors.fill: parent
onClicked: function (mouse) {
if (mouse.button === Qt.LeftButton) {
Applet.openWorkspace()
toolTip.close()
}
}
HoverHandler {
onHoveredChanged: {
if (hovered) {
toolTipShowTimer.start()
} else {
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

toolTip.close()
}
HoverHandler {
onHoveredChanged: {
if (hovered) {
toolTipShowTimer.start()
} else {
if (toolTipShowTimer.running) {
toolTipShowTimer.stop()
}

toolTip.close()
}
}
}
Expand Down