SpkToolbar: Support SpkPopupMenu also by MenuButton. Integrate SpkPopupMenu into the "actions" and "runtime" demo projects.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8739 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-02-23 22:25:12 +00:00
parent 318afbd40f
commit a49c3ad55f
9 changed files with 890 additions and 1653 deletions

View File

@ -555,7 +555,7 @@ type
implementation
uses
LCLIntf, Themes, spkt_Buttons;
LCLIntf, Themes, spkt_Buttons, SpkPopup;
{ TSpkToolbarDispatch }
@ -2551,6 +2551,9 @@ end;
procedure TSpkToolbar.SetMenuButtonDropdownMenu(const Value: TPopupMenu);
begin
FMenuButtonDropdownMenu := Value;
if (FMenuButtonDropdownMenu is TSpkPopupMenu) then
TSpkPopupMenu(FMenuButtonDropdownMenu).Appearance := Self.Appearance;
//if Assigned(FToolbarDispatch) then
// FToolbarDispatch.NotifyMetricsChanged;
end;

View File

@ -111,7 +111,6 @@ type
property AllowAllUp: Boolean read FAllowAllUp write SetAllowAllUp default false;
property ButtonKind: TSpkButtonKind read FButtonKind write SetButtonKind default bkButton;
property Checked: Boolean read GetChecked write SetChecked default false;
property DropdownMenu: TPopupMenu read FDropdownMenu write SetDropdownMenu;
property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;
@ -129,6 +128,7 @@ type
function GetRootComponent: TComponent;
property ActionLink: TSpkButtonActionLink read FActionLink;
property Checked: Boolean read GetChecked write SetChecked default false;
published
property Action: TBasicAction read GetAction write SetAction;