I want to create an image which acts like a button. Now I added my image as a ThemeResource Icon to the Button. The problem is, that the whole Button/Image gets to large as the Button width adapts to the ThemeResource Image size.
Is it possible to set the Size of the Button/Image?
final GridLayout containerLocale = new GridLayout(2, 1);
containerLocale.setSpacing(true);
containerLocale.setSizeUndefined();
final Button buttonDe = new Button();
buttonDe.setStyleName(ValoTheme.BUTTON_LINK);
buttonDe.setIcon(new ThemeResource("img/DE.svg"));
containerLocale.addComponent(buttonDe);
final Button buttonGb = new Button();
buttonGb.setStyleName(ValoTheme.BUTTON_LINK);
buttonGb.setIcon(new ThemeResource("img/GB.svg"));
buttonGb.setWidth("10px"); // Not working
buttonGb.setHeight("10px"); // Not working
buttonGb.addClickListener(new ClickListener() {
containerLocale.addComponent(buttonGb);