Skip to content

Commit

Permalink
fix: submenu position not right
Browse files Browse the repository at this point in the history
as title

pms: Bug-288131
  • Loading branch information
xionglinlin committed Dec 31, 2024
1 parent 96d5757 commit b988e5f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/tray-wayland-integration/pluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ bool PluginManager::tryCreatePopupForSubWindow(QWindow *window)
pluginPopup->setPopupType(Plugin::PluginPopup::PopupTypeTooltip);
pluginPopup->setPluginId(plugin->pluginId());
pluginPopup->setItemKey(plugin->itemKey());
pluginPopup->setX(parentWindow->x() + window->x());
pluginPopup->setY(parentWindow->y() + window->y());
auto pluginPos = plugin->pluginPos();
pluginPopup->setX(pluginPos.x() + window->x());
pluginPopup->setY(pluginPos.y() + window->y());
return true;
}

Expand All @@ -63,10 +64,10 @@ bool PluginManager::tryCreatePopupForSubWindow(QWindow *window)
pluginPopup->setPopupType(Plugin::PluginPopup::PopupTypeSubPopup);
pluginPopup->setPluginId(plugin->pluginId());
pluginPopup->setItemKey(plugin->itemKey());
auto geometry = parentWindow->geometry();
auto parentPos = plugin->pluginPos();
// TODO move to parentWindow's right position.
pluginPopup->setX(geometry.right());
pluginPopup->setY(window->y());
pluginPopup->setX(parentPos.x() + parentWindow->width());
pluginPopup->setY(parentPos.y() + window->y());
return true;
}

Expand Down

0 comments on commit b988e5f

Please sign in to comment.