mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 20:49:30 +02:00
trayicon: show popup on mouseup event from Felipe
git-svn-id: trunk@10538 -
This commit is contained in:
parent
a4579a8ef6
commit
b2bceaa57a
@ -217,8 +217,13 @@ begin
|
||||
2: if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
vwsTrayIcon.OnMouseUp(vwsTrayIcon, mbMiddle, [], Round(event^.X), Round(event^.Y));
|
||||
|
||||
3: if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
vwsTrayIcon.OnMouseUp(vwsTrayIcon, mbRight, [], Round(event^.X), Round(event^.Y));
|
||||
3:
|
||||
begin
|
||||
if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
vwsTrayIcon.OnMouseUp(vwsTrayIcon, mbRight, [], Round(event^.X), Round(event^.Y));
|
||||
if Assigned(vwsTrayIcon.PopUpMenu) then
|
||||
vwsTrayIcon.PopUpMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -246,19 +251,14 @@ begin
|
||||
else
|
||||
begin
|
||||
case event^.button of
|
||||
1: if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
1: if Assigned(vwsTrayIcon.OnMouseDown) then
|
||||
vwsTrayIcon.OnMouseDown(vwsTrayIcon, mbLeft, [], Round(event^.X), Round(event^.Y));
|
||||
|
||||
2: if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
vwsTrayIcon.OnMouseDown(vwsTrayIcon, mbMiddle, [], Round(event^.X), Round(event^.Y));
|
||||
2: if Assigned(vwsTrayIcon.OnMouseDown) then
|
||||
vwsTrayIcon.OnMouseDown(vwsTrayIcon, mbMiddle, [], Round(event^.X), Round(event^.Y));
|
||||
|
||||
3:
|
||||
begin
|
||||
if Assigned(vwsTrayIcon.OnMouseUp) then
|
||||
vwsTrayIcon.OnMouseDown(vwsTrayIcon, mbRight, [], Round(event^.X), Round(event^.Y));
|
||||
if Assigned(vwsTrayIcon.PopUpMenu) then
|
||||
vwsTrayIcon.PopUpMenu.PopUp(Mouse.CursorPos.X, Mouse.CursorPos.Y);
|
||||
end;
|
||||
3: if Assigned(vwsTrayIcon.OnMouseDown) then
|
||||
vwsTrayIcon.OnMouseDown(vwsTrayIcon, mbRight, [], Round(event^.X), Round(event^.Y));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -356,13 +356,13 @@ begin
|
||||
begin
|
||||
BtnPressEv := PXButtonPressedEvent(@ev);
|
||||
case BtnPressEv^.button of
|
||||
1: if Assigned(OnMouseUp) then
|
||||
1: if Assigned(OnMouseDown) then
|
||||
OnMouseDown(Self, mbLeft, [], Round(BtnPressEv^.X), Round(BtnPressEv^.Y));
|
||||
|
||||
2: if Assigned(OnMouseUp) then
|
||||
2: if Assigned(OnMouseDown) then
|
||||
OnMouseDown(Self, mbMiddle, [], Round(BtnPressEv^.X), Round(BtnPressEv^.Y));
|
||||
|
||||
3: if Assigned(OnMouseUp) then
|
||||
3: if Assigned(OnMouseDown) then
|
||||
OnMouseDown(Self, mbRight, [], Round(BtnPressEv^.X), Round(BtnPressEv^.Y));
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user