Exemplo n.º 1
0
 protected void autoWidth() {
   if (rendered && isAutoWidth()) {
     setWidth("auto");
     if (GXT.isIE) {
       if (textEl != null) {
         textEl.clip();
         TextMetrics.get().bind(textEl.dom);
         int adj = iconStyle != null ? 25 : 0;
         int w = TextMetrics.get().getWidth(text) + adj + 5;
         textEl.setWidth(w, true);
       }
     }
   }
 }
Exemplo n.º 2
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);
       }
     }
   }
 }