From 2bb208005306fab887470399059a35f14da9ad70 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 18 Dec 2008 13:48:04 +0000 Subject: [PATCH] Fixed stretching button IE7 issue in IButton instead of using css expression. Should fix #2344 svn changeset:6277/svn branch:trunk --- WebContent/ITMILL/themes/default/button/button.css | 7 ------- WebContent/ITMILL/themes/default/styles.css | 7 ------- src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java | 5 +++++ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/WebContent/ITMILL/themes/default/button/button.css b/WebContent/ITMILL/themes/default/button/button.css index 0d872cf886..d471d699cb 100644 --- a/WebContent/ITMILL/themes/default/button/button.css +++ b/WebContent/ITMILL/themes/default/button/button.css @@ -43,15 +43,8 @@ overflow: visible; padding-left: 10px; padding-right: 10px; - width: expression(this.offsetWidth + "px"); } -/* can't use expression hack in IE7 if lot's of button due - * performance issues (as often in table). See #2329 */ -*+html .i-table .i-button { - width: auto; -} - /* Error indicator on checkbox fix for IE6 */ * html .i-checkbox * { display: block; float: left;} * html .i-checkbox .i-errorindicator {padding-right:4px;} diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index 04a47d06cc..d99a2e6b9d 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -93,15 +93,8 @@ overflow: visible; padding-left: 10px; padding-right: 10px; - width: expression(this.offsetWidth + "px"); } -/* can't use expression hack in IE7 if lot's of button due - * performance issues (as often in table). See #2329 */ -*+html .i-table .i-button { - width: auto; -} - /* Error indicator on checkbox fix for IE6 */ * html .i-checkbox * { display: block; float: left;} * html .i-checkbox .i-errorindicator {padding-right:4px;} diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java index 80d5078e6f..160bcace2f 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IButton.java @@ -114,6 +114,11 @@ public class IButton extends Button implements Paintable { icon = null; } } + if (BrowserInfo.get().isIE7()) { + if (width.equals("")) { + setWidth(getOffsetWidth() + "px"); + } + } } @Override -- 2.39.5