Skip to content

Commit

Permalink
chore: remove warning
Browse files Browse the repository at this point in the history
as title.
  • Loading branch information
18202781743 committed Jul 17, 2024
1 parent c54759f commit 482d142
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion panels/dock/DockCompositor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Item {
}

onPluginPopupCreated: (popup) => {
console.log("plugin popup created", popup.pluginId, popup.itemKey, popup.pluginType)
console.log("plugin popup created", popup.pluginId, popup.itemKey, popup.popupType)
dockCompositor.popupCreated(popup)
}
}
Expand Down
4 changes: 3 additions & 1 deletion panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Button {
}

Component.onCompleted: {
if (!pluginItem.plugin)
return
pluginItem.plugin.updatePluginGeometry(Qt.rect(pluginItem.itemGlobalPoint.x, pluginItem.itemGlobalPoint.y, 0, 0))
pluginItem.plugin.setGlobalPos(pluginItem.itemGlobalPos)
}
Expand Down Expand Up @@ -122,7 +124,7 @@ Button {
}
}

D.ColorSelector.hovered: (pluginItem.plugin.isItemActive ?? false) || hoverHandler.hovered
D.ColorSelector.hovered: pluginItem.plugin && pluginItem.plugin.isItemActive || hoverHandler.hovered
background: D.BoxPanel {
property D.Palette backgroundPalette: DockPalette.backgroundPalette

Expand Down
3 changes: 3 additions & 0 deletions panels/dock/tray/package/tray.qml
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,23 @@ AppletItem {
return
}

console.log("tray's tooltip created", popupSurface.pluginId, popupSurface.itemKey)
toolTip.shellSurface = popupSurface
toolTip.DockPanelPositioner.bounding = Qt.binding(function () {
var point = Qt.point(toolTip.shellSurface.x, toolTip.shellSurface.y)
return Qt.rect(point.x, point.y, toolTip.width, toolTip.height)
})
toolTip.open()
} else if (popupSurface.popupType === Dock.TrayPopupTypePanel) {
console.log("tray's popup created", popupSurface.pluginId, popupSurface.itemKey)
popup.shellSurface = popupSurface
popup.DockPanelPositioner.bounding = Qt.binding(function () {
var point = Qt.point(popup.shellSurface.x, popup.shellSurface.y)
return Qt.rect(point.x, point.y, popup.width, popup.height)
})
popup.open()
} else if (popupSurface.popupType === Dock.TrayPopupTypeMenu) {
console.log("tray's menu created", popupSurface.pluginId, popupSurface.itemKey)
popupMenu.shellSurface = popupSurface
popupMenu.DockPositioner.bounding = Qt.binding(function () {
var point = Qt.point(popupMenu.shellSurface.x, popupMenu.shellSurface.y)
Expand Down
2 changes: 1 addition & 1 deletion panels/dock/tray/quickpanel/QuickPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Item {
target: DockCompositor
function onPopupCreated(popupSurface)
{
console.log("popup created", popupSurface.popupType, popupSurface.pluginId)
if (popupSurface.popupType === Dock.TrayPopupTypeEmbed) {
console.log("popup created", popupSurface.popupType, popupSurface.pluginId)
quickpanelModel.requestShowSubPlugin(popupSurface.pluginId, popupSurface)
}
}
Expand Down

0 comments on commit 482d142

Please sign in to comment.