SpkToolbar: cosmetic

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7970 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-02-15 15:36:59 +00:00
parent 4e0089b2f2
commit 3f28cb5ded

View File

@ -2570,21 +2570,21 @@ procedure TSpkToolbar.MenuButtonMouseUp(Button: TMouseButton; Shift: TShiftState
var var
aPopupPoint: TPoint; aPopupPoint: TPoint;
begin begin
//During rebuilding procees the mouse is ignored //During rebuilding procees the mouse is ignored
if FInternalUpdating or FUpdating then if FInternalUpdating or FUpdating then
exit; exit;
// Change Menu Button state and repaint // Change Menu Button state and repaint
FMenuButtonState := mbtHottrack; FMenuButtonState := mbtHottrack;
SetMetricsInvalid; SetMetricsInvalid;
Repaint; Repaint;
// Dropdown the Menu button dropdown menu or fire the event for click // Dropdown the Menu button dropdown menu or fire the event for click
if Assigned(FMenuButtonDropdownMenu) and (FShowMenuButton) then if Assigned(FMenuButtonDropdownMenu) and (FShowMenuButton) then
begin begin
aPopupPoint := ClientToScreen(GetMenuButtonDropdownPoint); aPopupPoint := ClientToScreen(GetMenuButtonDropdownPoint);
TPopupMenu(FMenuButtonDropdownMenu).PopUp(aPopupPoint.X, aPopupPoint.Y); TPopupMenu(FMenuButtonDropdownMenu).PopUp(aPopupPoint.X, aPopupPoint.Y);
end else end else
DoMenuButtonClick; DoMenuButtonClick;
end; end;