Fixed TreeItem stlyes that created a gap above Composite and complex widgets in Trees.
Patch by: jlabanca
Review by: ecc
Issue: 504
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4376 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForTree.java b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForTree.java
index aadc408..ca8e319 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForTree.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForTree.java
@@ -18,7 +18,9 @@
import com.google.gwt.museum.client.common.AbstractIssue;
import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RadioButton;
+import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -41,6 +43,9 @@
TreeItem d = new TreeItem(new RadioButton("myradio",
"I should line up nicely"));
TreeItem e = new TreeItem(new CheckBox("I should line up nicely"));
+ SimplePanel panel = new SimplePanel();
+ panel.setWidget(new Label("There should not be any space above me"));
+ TreeItem f = new TreeItem(panel);
t.setSelectedItem(b);
t.addItem(a);
@@ -48,6 +53,7 @@
t.addItem(c);
t.addItem(d);
t.addItem(e);
+ t.addItem(f);
b.addItem(ba);
b.addItem(bb);
bb.addItem(bba);
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
index f9ed0a6..f71a4a9 100644
--- a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css
@@ -1073,7 +1073,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;
diff --git a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
index 693c41f..6d8a276 100644
--- a/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
+++ b/user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css
@@ -1073,7 +1073,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
index 1e341c2..6b274f3 100644
--- a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css
@@ -977,7 +977,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;
diff --git a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
index f73cbff..4c7e922 100644
--- a/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
+++ b/user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css
@@ -977,7 +977,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
index 7b4b8ae..2b0341d 100644
--- a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css
@@ -1072,7 +1072,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;
diff --git a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
index e3e65af..22db0da 100644
--- a/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
+++ b/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css
@@ -1072,7 +1072,7 @@
}
.gwt-Tree .gwt-TreeItem {
- padding: 1px;
+ padding: 1px 0px;
margin: 0px;
white-space: nowrap;
cursor: hand;