From e565e8523c892e3c660652028333d9c30af1a104 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Risto=20Yrj=C3=A4n=C3=A4?= Date: Tue, 22 Jul 2008 07:37:44 +0000 Subject: [PATCH] Added CSS for MenuBar svn changeset:5110/svn branch:trunk --- .../ITMILL/themes/default/menubar/menubar.css | 45 +++++++++++++++++++ .../terminal/gwt/client/ui/IMenuBar.java | 5 --- 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 WebContent/ITMILL/themes/default/menubar/menubar.css diff --git a/WebContent/ITMILL/themes/default/menubar/menubar.css b/WebContent/ITMILL/themes/default/menubar/menubar.css new file mode 100644 index 0000000000..649b8348ef --- /dev/null +++ b/WebContent/ITMILL/themes/default/menubar/menubar.css @@ -0,0 +1,45 @@ +/* + *MenuBar styles + */ + +/*Top menu */ +.i-menubar table { + font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif; + + border-right: 2px solid #c6cbcc; + border-bottom: 2px solid #c6cbcc; + border-top: 1px solid #d0d4d5; + border-left: 1px solid #d0d4d5; + + background-color : #e9eced; + white-space: nowrap; +} + +.i-menubar .gwt-MenuItem { + cursor : default; + + padding : 0px 10px; + margin : 0px 10px; + + background-color : #e9eced; + } + +.i-menubar .gwt-MenuItem-selected { + background-color : #fff; + } + +/*Submenu*/ +.i-menubar_submenu { + font-size : 12px; + padding : 3px; + font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif; + color: #464f52; + background-color : #e9eced; + white-space: nowrap; + + border-right: 2px solid #c6cbcc; + border-bottom: 2px solid #c6cbcc; + border-top: 1px solid #d0d4d5; + border-left: 1px solid #d0d4d5; + +} \ No newline at end of file diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java index c943b91ea6..6c8e5f9892 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IMenuBar.java @@ -5,7 +5,6 @@ import java.util.Iterator; import java.util.Stack; import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.MenuBar; import com.google.gwt.user.client.ui.MenuItem; import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection; @@ -39,7 +38,6 @@ public class IMenuBar extends MenuBar implements Paintable { public IMenuBar() { // Create an empty horizontal menubar super(); - DOM.setStyleAttribute(this.getElement(), "white-space", "nowrap"); // This method call of the Paintable interface sets the component // style name in DOM tree @@ -48,7 +46,6 @@ public class IMenuBar extends MenuBar implements Paintable { public IMenuBar(boolean vertical) { super(vertical); - DOM.setStyleAttribute(this.getElement(), "white-space", "nowrap"); // This method call of the Paintable interface sets the component // style name in DOM tree @@ -114,8 +111,6 @@ public class IMenuBar extends MenuBar implements Paintable { Stack menuStack = new Stack(); MenuBar currentMenu = this; - // int topLevelWidth = 0; - while (itr.hasNext()) { UIDL item = (UIDL) itr.next(); MenuItem currentItem = null; // For receiving the item -- 2.39.5