Emily -
Please do a code review on this patch which adds some additional styles to
TabBar.
Description:
=========
It would be nice to add the styles gwt-TabBarFirstWrapper and
gwt-TabBarRestWrapper to the TD cells that wrap the gwt-TabBarFirst and
gwt-TabBarRest divs so the cells themselves can be styled. Currently, we do
provide the style gwt-TabBarItemWrapper on the TD cells around TabBar
items. The primary use case is to hide the td cell that contains the
TabBarRest element so it doesn't push out on its container, which can happen
in some layouts.
Fix:
===
Added the styles. I use "gwt-TabBarFirst-wrapper" and
"gwt-TabBarRest-wrapper" to be consistent with the existing style
"gwt-TabBarItem-wrapper".
Testing:
======
I manually verified that the styles are applied correctly in all main
browsers.
Thanks,
John LaBanca
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---
Index: user/src/com/google/gwt/user/client/ui/TabBar.java
===================================================================
--- user/src/com/google/gwt/user/client/ui/TabBar.java (revision 3641)
+++ user/src/com/google/gwt/user/client/ui/TabBar.java (working copy)
@@ -28,7 +28,11 @@
* <ul class='css'>
* <li>.gwt-TabBar { the tab bar itself }</li>
* <li>.gwt-TabBar .gwt-TabBarFirst { the left edge of the bar }</li>
+ * <li>.gwt-TabBar .gwt-TabBarFirst-wrapper { table cell around the left edge }
+ * </li>
* <li>.gwt-TabBar .gwt-TabBarRest { the right edge of the bar }</li>
+ * <li>.gwt-TabBar .gwt-TabBarRest-wrapper { table cell around the right edge }
+ * </li>
* <li>.gwt-TabBar .gwt-TabBarItem { unselected tabs }</li>
* <li>.gwt-TabBar .gwt-TabBarItem-wrapper { table cell around tab }</li>
* <li>.gwt-TabBar .gwt-TabBarItem-selected { additional style for selected
@@ -122,6 +126,10 @@
first.setHeight("100%");
panel.setCellHeight(first, "100%");
panel.setCellWidth(rest, "100%");
+ setStyleName(first.getElement().getParentElement(),
+ "gwt-TabBarFirst-wrapper");
+ setStyleName(rest.getElement().getParentElement(),
+ "gwt-TabBarRest-wrapper");
}
/**