aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/Util.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-12-27 12:20:32 +0000
committerArtur Signell <artur.signell@itmill.com>2010-12-27 12:20:32 +0000
commit2c96704d94f8be83977fa5cf2350509b1b914f70 (patch)
treef6b1287a5357c892cc637c33b9815a58d9588d6b /src/com/vaadin/terminal/gwt/client/Util.java
parent23618a1d3c03f147bfe06416cf2bff3b7c287e58 (diff)
downloadvaadin-framework-2c96704d94f8be83977fa5cf2350509b1b914f70.tar.gz
vaadin-framework-2c96704d94f8be83977fa5cf2350509b1b914f70.zip
#6035 - Icons are no longer transparent in MenuBar in IE6
#6204 - IE6 png transparency fix depends on Runo theme svn changeset:16654/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/Util.java')
-rw-r--r--src/com/vaadin/terminal/gwt/client/Util.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java
index b417663b3b..fcc2576068 100644
--- a/src/com/vaadin/terminal/gwt/client/Util.java
+++ b/src/com/vaadin/terminal/gwt/client/Util.java
@@ -10,6 +10,7 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.Document;
@@ -250,17 +251,15 @@ public class Util {
*
* @param el
* IMG element
- * @param blankImageUrl
- * URL to transparent one-pixel gif
*/
- public native static void addPngFix(Element el, String blankImageUrl)
+ public native static void addPngFix(Element el)
/*-{
el.attachEvent("onload", function() {
- @com.vaadin.terminal.gwt.client.Util::doPngFix(Lcom/google/gwt/user/client/Element;Ljava/lang/String;)(el,blankImageUrl);
+ @com.vaadin.terminal.gwt.client.Util::doIE6PngFix(Lcom/google/gwt/user/client/Element;)(el);
},false);
}-*/;
- public native static void doPngFix(Element el, String blankImageUrl)
+ private native static void doPngFix(Element el, String blankImageUrl)
/*-{
var src = el.src;
if (src.indexOf(".png") < 1) return;
@@ -281,10 +280,12 @@ public class Util {
el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')";
}-*/;
- public static void doIE6PngFix(Element el, ApplicationConnection ac) {
- String blankImageUrl = ac.getThemeUri()
- + "/../runo/common/img/blank.gif";
- doPngFix(el, blankImageUrl);
+ public static void doIE6PngFix(Element el) {
+ String blankImageUrl = GWT.getModuleBaseURL() + "ie6pngfix/blank.gif";
+ String src = el.getAttribute("src");
+ if (src != null && !src.equals(blankImageUrl)) {
+ doPngFix(el, blankImageUrl);
+ }
}
/**