TTMSFMXPopup (Footer)Button Layout

Buttons in a runtime created FMXPopup seem to ignore the Layout property.

Maybe I'm doing something wrong.

Example code (new Multi-Device Application with 1 standard button)

procedure TForm1.Button1Click(Sender: TObject);
var
  pop: TTMSFMXPopup;
  btn : TTMSFMXPopupButton;
begin
  pop := TTMSFMXPopup.Create(nil);
  try
     btn := pop.FooterButtons.Add;
     btn.Text := 'Cancel';
     btn.Layout := TTMSFMXBarButtonShapeLayout.slPointer;

     pop.ShowPopup(Button1, True);
  finally
    pop.Free;
  end;
end;

The popup is actually an invisible FMX control that relies on a style. If the parent is not set, the style is not loaded. Please use the following code for correct style/appearance linking.


var
  pop: TTMSFMXPopup;
  btn : TTMSFMXPopupButton;
begin
  pop := TTMSFMXPopup.Create(Self);
  try
     pop.Parent := Self;
     pop.NeedStyleLookup;
     pop.ApplyStyleLookup;
     btn := pop.FooterButtons.Add;
     btn.Text := 'Cancel';
     btn.Layout := TTMSFMXBarButtonShapeLayout.slPointer;

     pop.ShowPopup(Button1, True);
  finally
    pop.Free;
  end;