summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2013-06-14 16:44:46 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-26 07:30:14 +0000
commitc4ec786dba90eac9e41f87d2f31cd93b38935185 (patch)
treed71d1e4c774b8aded599eaafa58f71245abcc602
parent6f2db493259094e606696197eb3506f466977d4c (diff)
downloadvaadin-framework-c4ec786dba90eac9e41f87d2f31cd93b38935185.tar.gz
vaadin-framework-c4ec786dba90eac9e41f87d2f31cd93b38935185.zip
Things now align better in SimpleTree, for #12058
Change-Id: Ie36f51b8b6e28aaf0055772a6cf4dcd35b716a3a
-rw-r--r--client/src/com/vaadin/client/SimpleTree.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/SimpleTree.java b/client/src/com/vaadin/client/SimpleTree.java
index 289f05022a..7370496cb8 100644
--- a/client/src/com/vaadin/client/SimpleTree.java
+++ b/client/src/com/vaadin/client/SimpleTree.java
@@ -21,6 +21,7 @@ import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Cursor;
import com.google.gwt.dom.client.Style.Display;
+import com.google.gwt.dom.client.Style.TextAlign;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
@@ -54,9 +55,10 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
style.setProperty("whiteSpace", "nowrap");
style.setPadding(3, Unit.PX);
style.setPaddingLeft(12, Unit.PX);
-
+ // handle styling
style = handle.getStyle();
style.setDisplay(Display.NONE);
+ style.setTextAlign(TextAlign.CENTER);
style.setWidth(0.5, Unit.EM);
style.setHeight(0.5, Unit.EM);
style.setCursor(Cursor.POINTER);
@@ -68,8 +70,9 @@ public class SimpleTree extends ComplexPanel implements HasDoubleClickHandlers {
handle.setInnerHTML("+");
getElement().appendChild(handle);
getElement().appendChild(text);
+ // children styling
style = children.getStyle();
- style.setPaddingLeft(9, Unit.PX);
+ style.setPaddingLeft(1.5, Unit.EM);
style.setDisplay(Display.NONE);
getElement().appendChild(children);