spktoolbar: Support the ShortCut2 property of TSpkPopupMenu items.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8731 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-22 14:27:25 +00:00
parent 046cd102fc
commit 29a4c0d8f3

View File

@ -217,9 +217,11 @@ begin
end else
begin
y := (ARect.Top + ARect.Bottom - hText) div 2;
if menuItem.ShortCut <> 0 then
if menuItem.ShortCut <> scNone then
begin
shortCutText := ShortCutToText(menuItem.ShortCut);
if menuItem.ShortCutKey2 <> scNone then
shortCutText := ShortCutText + ', ' + ShortCutToText(menuItem.ShortCutKey2);
wText := ACanvas.TextWidth(shortCutText);
TGUITools.DrawText(ACanvas, ARect.Right - wText - DropdownMenuMargin, y, shortcutText, TextColor);
end else