From 59ed7c4303ac47d3f815f028e1efe5af16c75037 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Tue, 6 Oct 2009 12:46:17 +0000 Subject: [PATCH] Fixes #3405: Sampler button icons messed up in IE6 svn changeset:9109/svn branch:6.2 --- .../VAADIN/themes/sampler/sampler/styles.css | 16 ++++++------- src/com/vaadin/terminal/gwt/client/Util.java | 24 ++++++++++++------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/WebContent/VAADIN/themes/sampler/sampler/styles.css b/WebContent/VAADIN/themes/sampler/sampler/styles.css index 82f9a237e2..3cb1e458f8 100644 --- a/WebContent/VAADIN/themes/sampler/sampler/styles.css +++ b/WebContent/VAADIN/themes/sampler/sampler/styles.css @@ -117,6 +117,13 @@ .v-app-SamplerApplication .v-horizontallayout-topbar .v-nativebutton-link:hover span { text-decoration: underline; } +.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next:active, +.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-pressed, +.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-disabled, +.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-tree-switch:active, +.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-tree-switch.v-pressed { + background-position: right bottom; +} .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton, .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton.v-disabled, .v-app-SamplerApplication .v-horizontallayout-segment .v-popupview { @@ -137,13 +144,6 @@ .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-tree-switch { background-position: right top; } -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next:active, -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-pressed, -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-disabled, -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-tree-switch:active, -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-tree-switch.v-pressed { - background-position: right bottom; -} .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-down { background-position: right bottom; } @@ -227,7 +227,7 @@ } .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next span, .v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-pressed span, -.v-app-SamplerApplication .v-horizontallayout-segment .v-nativebutton-next.v-disabled span { +.v-app-SamplerApplication .v-horizontallayout-segment .v-disabled.v-nativebutton-next span { background-image: url(next.png); } .v-popupview-popup-quickjump { diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index 770214f45e..ab41de0b0c 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -230,14 +230,22 @@ public class Util { /*-{ el.attachEvent("onload", function() { var src = el.src; - if (src.indexOf(".png")<1) return; - var w = el.width||16; - var h = el.height||16; - el.src =blankImageUrl; - el.style.height = h+"px"; - el.style.width = w+"px"; - el.style.padding = "0px"; - el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')"; + if (src.indexOf(".png") < 1) return; + var w = el.width || 16; + var h = el.height || 16; + if(h==30 || w==28) { + setTimeout(function(){ + el.style.height = el.height + "px"; + el.style.width = el.width + "px"; + el.src = blankImageUrl; + },10); + } else { + el.src = blankImageUrl; + el.style.height = h + "px"; + el.style.width = w + "px"; + } + el.style.padding = "0"; + el.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')"; },false); }-*/; -- 2.39.5