summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/terminal/gwt
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2009-03-02 12:00:33 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2009-03-02 12:00:33 +0000
commit455a509b6e08d05af6b5ed5f024a08f439e98896 (patch)
tree1b830921503c603c80dba80ecf1cd3b507276891 /src/com/itmill/toolkit/terminal/gwt
parentf40425c1af00639182ab203524e10d1671b1a4fd (diff)
downloadvaadin-framework-455a509b6e08d05af6b5ed5f024a08f439e98896.tar.gz
vaadin-framework-455a509b6e08d05af6b5ed5f024a08f439e98896.zip
Fixes #2704 for version 6.0: Popup shadow right and left part missing in Opera 9.6
svn changeset:6995/svn branch:6.0
Diffstat (limited to 'src/com/itmill/toolkit/terminal/gwt')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IToolkitOverlay.java29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IToolkitOverlay.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IToolkitOverlay.java
index 53862675eb..763d75c3af 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IToolkitOverlay.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IToolkitOverlay.java
@@ -190,7 +190,7 @@ public class IToolkitOverlay extends PopupPanel {
/*
* Extending classes should always call this method after they change the
* size of overlay without using normal 'setWidth(String)' and
- * 'setHeight(String)' methods.
+ * 'setHeight(String)' methods (if not calling super.setWidth/Height).
*/
protected void updateShadowSizeAndPosition() {
updateShadowSizeAndPosition(1.0);
@@ -218,8 +218,7 @@ public class IToolkitOverlay extends PopupPanel {
// redundant try/catch block (See dev.itmill.com #2011)
zIndex = DOM.getStyleAttribute(getElement(), "zIndex");
} catch (Exception ignore) {
- // Ignored, will cause no harm, other than a little eye-candy
- // missing
+ // Ignored, will cause no harm
}
if (zIndex == null) {
zIndex = "" + Z_INDEX;
@@ -256,15 +255,35 @@ public class IToolkitOverlay extends PopupPanel {
width = (int) (width * progress);
height = (int) (height * progress);
+ // Opera needs some shaking to get parts of the shadow showing properly
+ // (ticket #2704)
+ if (BrowserInfo.get().isOpera()) {
+ // Clear the height of all middle elements
+ DOM.getChild(shadow, 3).getStyle().setProperty("height", "auto");
+ DOM.getChild(shadow, 4).getStyle().setProperty("height", "auto");
+ DOM.getChild(shadow, 5).getStyle().setProperty("height", "auto");
+ }
+
// Update correct values
- DOM.setStyleAttribute(shadow, "display", progress < 0.9 ? "none" : "");
DOM.setStyleAttribute(shadow, "zIndex", zIndex);
DOM.setStyleAttribute(shadow, "width", width + "px");
DOM.setStyleAttribute(shadow, "height", height + "px");
DOM.setStyleAttribute(shadow, "top", y + "px");
DOM.setStyleAttribute(shadow, "left", x + "px");
+ DOM.setStyleAttribute(shadow, "display", progress < 0.9 ? "none" : "");
+
+ // Opera fix, part 2 (ticket #2704)
+ if (BrowserInfo.get().isOpera()) {
+ // We'll fix the height of all the middle elements
+ DOM.getChild(shadow, 3).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 3).getOffsetHeight());
+ DOM.getChild(shadow, 4).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 4).getOffsetHeight());
+ DOM.getChild(shadow, 5).getStyle().setPropertyPx("height",
+ DOM.getChild(shadow, 5).getOffsetHeight());
+ }
- // attach to dom if not there already
+ // Attach to dom if not there already
if (shadow.getParentElement() == null) {
RootPanel.get().getElement().insertBefore(shadow, getElement());
}