Removed the unncessary padding from RadioButtons in the GWT style themes so that they line up nicely in Trees and in other uses. The padding was not needed for any styling reason.
Patch by: jlabanca
Review by: ecc
Issues: 2854, 2859
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4359 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
index 0920476..5de3c03 100644
--- a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
@@ -4,10 +4,14 @@
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.museum.Museum'/>
<inherits name="com.google.gwt.user.theme.standard.StandardResources"/>
+ <inherits name="com.google.gwt.user.theme.chrome.ChromeResources"/>
+ <inherits name="com.google.gwt.user.theme.dark.DarkResources"/>
<!-- Specify the app entry point class. -->
<entry-point class='com.google.gwt.museum.client.defaultmuseum.VisualsForDateBox'/>
<source path="client/common"/>
<source path="client/defaultmuseum"/>
<source path="client/viewer"/>
+
+ <extend-property name="locale" values="ar"/>
</module>
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 fde6b1b..aadc408 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
@@ -17,6 +17,8 @@
package com.google.gwt.museum.client.defaultmuseum;
import com.google.gwt.museum.client.common.AbstractIssue;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -36,11 +38,16 @@
TreeItem bba = new TreeItem("b.b.a");
TreeItem bc = new TreeItem("b.c");
TreeItem c = new TreeItem("c");
+ TreeItem d = new TreeItem(new RadioButton("myradio",
+ "I should line up nicely"));
+ TreeItem e = new TreeItem(new CheckBox("I should line up nicely"));
t.setSelectedItem(b);
t.addItem(a);
t.addItem(b);
t.addItem(c);
+ t.addItem(d);
+ t.addItem(e);
b.addItem(ba);
b.addItem(bb);
bb.addItem(bba);
diff --git a/user/src/com/google/gwt/user/client/ui/Tree.java b/user/src/com/google/gwt/user/client/ui/Tree.java
index cab7ab1..3f794ba 100644
--- a/user/src/com/google/gwt/user/client/ui/Tree.java
+++ b/user/src/com/google/gwt/user/client/ui/Tree.java
@@ -807,6 +807,8 @@
void showLeafImage(TreeItem treeItem) {
if (useLeafImages || treeItem.isFullNode()) {
showImage(treeItem, images.treeLeaf());
+ } else if (LocaleInfo.getCurrentLocale().isRTL()) {
+ DOM.setStyleAttribute(treeItem.getElement(), "paddingRight", indentValue);
} else {
DOM.setStyleAttribute(treeItem.getElement(), "paddingLeft", indentValue);
}
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 0cbeb4e..aef775b 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
@@ -582,7 +582,6 @@
}
.gwt-RadioButton {
- padding: 4px 4px 3px 3px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -1083,6 +1082,14 @@
.gwt-Tree .gwt-TreeItem-selected {
background: #93c2f1 url(images/hborder.png) repeat-x 0px -1463px;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-left: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-left: -4px;
+}
.gwt-DateBox input {
width: 8em;
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 c4c3746..6c7b4c1 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
@@ -582,7 +582,6 @@
}
.gwt-RadioButton {
- padding: 4px 3px 3px 4px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -1079,10 +1078,19 @@
white-space: nowrap;
cursor: hand;
cursor: pointer;
+ zoom: 1;
}
.gwt-Tree .gwt-TreeItem-selected {
background: #93c2f1 url(images/hborder.png) repeat-x 0px -1463px;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-right: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-right: -4px;
+}
.gwt-DateBox input {
width: 8em;
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 37ab4c6..30ee38e 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
@@ -551,7 +551,6 @@
}
.gwt-RadioButton {
- padding: 4px 4px 3px 3px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -988,6 +987,14 @@
color: #0cf;
background: #1c1c1c;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-left: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-left: -4px;
+}
.gwt-DateBox input {
width: 8em;
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 6de5961..d904793 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
@@ -551,7 +551,6 @@
}
.gwt-RadioButton {
- padding: 4px 3px 3px 4px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -983,11 +982,20 @@
white-space: nowrap;
cursor: hand;
cursor: pointer;
+ zoom: 1;
}
.gwt-Tree .gwt-TreeItem-selected {
color: #0cf;
background: #1c1c1c;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-right: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-right: -4px;
+}
.gwt-DateBox input {
width: 8em;
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 76fb73a..8b1d7bd 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
@@ -582,7 +582,6 @@
}
.gwt-RadioButton {
- padding: 4px 4px 3px 3px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -1082,6 +1081,14 @@
.gwt-Tree .gwt-TreeItem-selected {
background: #93c2f1 url(images/hborder.png) repeat-x 0px -1463px;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-left: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-left: -4px;
+}
.gwt-DateBox input {
width: 8em;
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 916ea1f..f3b7d26 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
@@ -582,7 +582,6 @@
}
.gwt-RadioButton {
- padding: 4px 3px 3px 4px;
}
.gwt-RadioButton-disabled {
color: #888;
@@ -1078,10 +1077,19 @@
white-space: nowrap;
cursor: hand;
cursor: pointer;
+ zoom: 1;
}
.gwt-Tree .gwt-TreeItem-selected {
background: #93c2f1 url(images/hborder.png) repeat-x 0px -1463px;
}
+.gwt-TreeItem .gwt-RadioButton input,
+.gwt-TreeItem .gwt-CheckBox input {
+ margin-right: 0px;
+}
+* html .gwt-TreeItem .gwt-RadioButton input,
+* html .gwt-TreeItem .gwt-CheckBox input {
+ margin-right: -4px;
+}
.gwt-DateBox input {
width: 8em;