PDA

View Full Version : [FIXED] minButtonWidth not working in neptune theme



francesco.calabri
10 Mar 2016, 3:54 AM
Hi,
i've noticed that setMinButtonWidth of toolbar class (com (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom).sencha (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha).gxt (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha.gxt).widget (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha.gxt.widget).core (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha.gxt.widget.core).client (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha.gxt.widget.core.client).toolbar (https://www.sencha.com/forum/%E2%98%82=button-test/C:%5C/Workspace-Luna%5C/ren%5C/button-test%5C/war%5C/WEB-INF%5C/lib%5C/gxt.jar%3Ccom.sencha.gxt.widget.core.client.toolbar).ToolBar) doesn't work as expected - or even doesn't work at all - in neptune theme.
I'm using GWT 2.7 and GXT 4.0.

This is the example code to reproduce the issue (the only class in the project).


import com.google.gwt.core.client.EntryPoint;
import com.sencha.gxt.widget.core.client.Dialog;
import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton;
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;

public class ButtonTest implements EntryPoint {

public void onModuleLoad() {
Dialog dialog = new Dialog();
dialog.setModal(true);
dialog.setHeading("Dialog");
dialog.add(new LabelToolItem("Button test"));
dialog.setPixelSize(500, 300);
dialog.setButtonAlign(BoxLayoutPack.CENTER);
dialog.setMinButtonWidth(80);
dialog.setPredefinedButtons(PredefinedButton.YES, PredefinedButton.NO);
dialog.show();
}
}


My gwt.xml is


<module rename-to='button_test'>
<inherits name='com.google.gwt.user.User' />
<inherits name='com.sencha.gxt.ui.GXT' />
<inherits name="com.sencha.gxt.theme.neptune.Theme"/>
<entry-point class='it.netstudio.buttontest.client.ButtonTest' />
<source path='client' />
<collapse-all-properties/>
</module>


The code works fine with the default theme.
Seen with Chrome 48.

branflake2267
10 Mar 2016, 5:32 PM
Thanks for the report! I have opened a bug in our bug tracker.

branflake2267
10 Mar 2016, 5:33 PM
You're right. Thanks for filing. Do you need some help finding a workaround?

francesco.calabri
16 Mar 2016, 5:35 AM
Thanks, setting the desired width on each button does the job