summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-14 12:31:23 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-14 12:31:23 +0200
commitacf87e2d323fbb001a7fdfae42982b2f618ff6f5 (patch)
treee8f1fa9a6e5868819b2a6f4e9b4448581dec8431 /src
parente4a0139b80659c52c05c7be6697f3a7ddaed38a6 (diff)
downloadvaadin-framework-acf87e2d323fbb001a7fdfae42982b2f618ff6f5.tar.gz
vaadin-framework-acf87e2d323fbb001a7fdfae42982b2f618ff6f5.zip
Some small tweaks to the split panels (#8313)
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java11
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanelPaintable.java2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java
index 9a24384f1e..d3ac9b2def 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanel.java
@@ -231,10 +231,11 @@ public class VAbstractSplitPanel extends ComplexPanel {
// Convert percentage values to pixels
if (pos.indexOf("%") > 0) {
- pos = Float.parseFloat(pos.substring(0, pos.length() - 1))
- / 100
- * (orientation == ORIENTATION_HORIZONTAL ? getOffsetWidth()
- : getOffsetHeight()) + "px";
+ int size = orientation == ORIENTATION_HORIZONTAL ? getOffsetWidth()
+ : getOffsetHeight();
+ float percentage = Float.parseFloat(pos.substring(0,
+ pos.length() - 1));
+ pos = percentage / 100 * size + "px";
}
String attributeName;
@@ -457,6 +458,7 @@ public class VAbstractSplitPanel extends ComplexPanel {
}
setSplitPosition(newX + "px");
+ client.doLayout(false);
}
private void onVerticalMouseMove(int y) {
@@ -500,6 +502,7 @@ public class VAbstractSplitPanel extends ComplexPanel {
}
setSplitPosition(newY + "px");
+ client.doLayout(false);
}
public void onMouseUp(Event event) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanelPaintable.java b/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanelPaintable.java
index 8b21c26960..7f33c0fa28 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanelPaintable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAbstractSplitPanelPaintable.java
@@ -94,8 +94,6 @@ public abstract class VAbstractSplitPanelPaintable extends
getWidgetForPaintable().setStylenames();
getWidgetForPaintable().position = uidl.getStringAttribute("position");
- getWidgetForPaintable().setSplitPosition(
- getWidgetForPaintable().position);
final VPaintableWidget newFirstChildPaintable = client
.getPaintable(uidl.getChildUIDL(0));