]> source.dussan.org Git - vaadin-framework.git/commitdiff
Modified VFilterSelect to consider textfield margin accordingly in its width calculat...
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Thu, 21 May 2009 10:34:42 +0000 (10:34 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Thu, 21 May 2009 10:34:42 +0000 (10:34 +0000)
svn changeset:7933/svn branch:6.0

src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java

index 01212a33a47edcde4351690568dbd494243f8519..230ef3b44bcdbcb6db19198f95c9e2c53abbb857 100644 (file)
@@ -981,7 +981,9 @@ public class VFilterSelect extends Composite implements Paintable, Field,
              */
             int tbWidth = Util.getRequiredWidth(tb);
             int openerWidth = Util.getRequiredWidth(popupOpener);
-            int iconWidth = Util.getRequiredWidth(selectedItemIcon);
+            int iconWidth = selectedItemIcon.isAttached() ? Util
+                    .measureMarginLeft(tb.getElement())
+                    - Util.measureMarginLeft(selectedItemIcon.getElement()) : 0;
 
             int w = tbWidth + openerWidth + iconWidth;
             if (suggestionPopupMinWidth > w) {