Skip to content

Commit

Permalink
Correcting the position on menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahzaibIbrahim committed Aug 29, 2024
1 parent b43e9c5 commit edcd338
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void _setVisible (boolean visible) {
void _showMenu (boolean visible, MenuItem menuItem) {
long hwndParent = parent.handle;
if (visible) {
Rectangle r = menuItem.getBounds();
Rectangle r = DPIUtil.scaleDown(menuItem.getBounds(), menuItem.getZoom());
Point p = getDisplay().map(parent, null, new Point(r.x, r.y));
boolean success = OS.TrackPopupMenu (handle, 0, p.x, p.y, 0, hwndParent, null);
if (!success && OS.GetMenuItemCount (handle) == 0) {
Expand Down

0 comments on commit edcd338

Please sign in to comment.