1
votes

RoundBorder doesnt work for ScaleImageButton.

//it doesnt works
ScaleImageButton leaveButton = new ScaleImageButton(leaveIcon);
leaveButton.getAllStyles().setBorder(
        RoundBorder.create().color(0xffd04b).rectangle(true)
);

//It works
Label leaveButton = new Label(leaveIcon);
leaveButton.getAllStyles().setBorder(
        RoundBorder.create().color(0xffd04b).rectangle(true)
);

One more thing how can I make the roundBorder square? There's rectangle() method but are there any other methods for other structures for instance pentagonal, hexagonal?

1

1 Answers

0
votes

RoundBorder is always rounded, you are looking for RoundedBorder which is something else.

Both of these won't work with ScaledImage* classes which rely on the background style being image. You can wrap that class in a container and give that the style that you want.