]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #1815 (opera, tray notifications);
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 16 Jun 2008 08:58:53 +0000 (08:58 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 16 Jun 2008 08:58:53 +0000 (08:58 +0000)
svn changeset:4896/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/Notification.java

index 42ce1ade1fc44cfa4d7a886c42b9743759afa4c1..267a07dcca698b5c3189060d1ecc1d989d6bc3a3 100644 (file)
@@ -14,6 +14,7 @@ import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.Timer;\r
 import com.google.gwt.user.client.ui.HTML;\r
 import com.google.gwt.user.client.ui.Widget;\r
+import com.itmill.toolkit.terminal.gwt.client.BrowserInfo;\r
 \r
 public class Notification extends ToolkitOverlay {\r
 \r
@@ -133,6 +134,13 @@ public class Notification extends ToolkitOverlay {
                 if (opacity <= 0) {\r
                     cancel();\r
                     hide();\r
+                    if (BrowserInfo.get().isOpera()) {\r
+                        // tray notification on opera needs to explicitly define\r
+                        // size, reset it\r
+                        DOM.setStyleAttribute(getElement(), "width", "");\r
+                        DOM.setStyleAttribute(getElement(), "height", "");\r
+                    }\r
+\r
                 }\r
             }\r
         };\r
@@ -157,6 +165,11 @@ public class Notification extends ToolkitOverlay {
             break;\r
         case BOTTOM_RIGHT:\r
             DOM.setStyleAttribute(el, "position", "absolute");\r
+            if (BrowserInfo.get().isOpera()) {\r
+                // tray notification on opera needs explicitly defined size\r
+                DOM.setStyleAttribute(el, "width", getOffsetWidth() + "px");\r
+                DOM.setStyleAttribute(el, "height", getOffsetHeight() + "px");\r
+            }\r
             DOM.setStyleAttribute(el, "bottom", "0px");\r
             DOM.setStyleAttribute(el, "right", "0px");\r
             break;\r