mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
IDE: Improve popup menu position in designer when using keyboard. Issue #40807, patch by n7800.
This commit is contained in:
parent
473cc20292
commit
560115beea
@ -2040,7 +2040,13 @@ begin
|
||||
begin
|
||||
PopupMenuComponentEditor := GetComponentEditorForSelection;
|
||||
BuildPopupMenu;
|
||||
FDesignerPopupMenu.Popup(Message.XPos, Message.YPos);
|
||||
if (Message.XPos = -1) and (Message.YPos = -1) then
|
||||
// called from keyboard (VK_APPS or Shift+F10)
|
||||
with Form.ClientToScreen(Point(Selection.Left, Selection.Top)) do
|
||||
FDesignerPopupMenu.Popup(X, Y)
|
||||
else
|
||||
// coordinates can be negative with multiple monitors
|
||||
FDesignerPopupMenu.Popup(Message.XPos, Message.YPos);
|
||||
end;
|
||||
Message.Result := 1;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user