Esempio n. 1
0
 protected void autoWidth() {
   if (rendered && width == null) {
     setWidth("auto");
     if (GXT.isIE7 && GXT.isStrict) {
       if (buttonEl != null && buttonEl.getWidth() > 20) {
         buttonEl.clip();
         TextMetrics.get().bind(buttonEl.dom);
         buttonEl.setWidth(TextMetrics.get().getWidth(text) + buttonEl.getFrameWidth("lr"), true);
       }
     }
     if (minWidth != Style.DEFAULT) {
       if (getWidth() < minWidth) {
         setWidth(minWidth);
       }
     }
   }
 }