summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2013-06-14 16:44:46 +0300
committerArtur Signell <artur@vaadin.com>2013-06-26 10:30:45 +0300
commitc5a770b00e403921e670dcd789f7e53cc9bf85a9 (patch)
tree64d3797e87cce373884f1218c0bcfa38a4db8f63
parent86c72d1043d8e68ffa25c5364987e16f11ca20c5 (diff)
downloadvaadin-framework-c5a770b00e403921e670dcd789f7e53cc9bf85a9.tar.gz
vaadin-framework-c5a770b00e403921e670dcd789f7e53cc9bf85a9.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);