mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 04:59:08 +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,6 +2040,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
PopupMenuComponentEditor := GetComponentEditorForSelection;
|
PopupMenuComponentEditor := GetComponentEditorForSelection;
|
||||||
BuildPopupMenu;
|
BuildPopupMenu;
|
||||||
|
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);
|
FDesignerPopupMenu.Popup(Message.XPos, Message.YPos);
|
||||||
end;
|
end;
|
||||||
Message.Result := 1;
|
Message.Result := 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user