From 4b1bddf625a8d3aa4e7db3cb4a7c17c44138cf64 Mon Sep 17 00:00:00 2001 From: Sauli Tähkäpää Date: Fri, 26 Dec 2014 13:34:49 +0200 Subject: Determine window header margin size depending on visible buttons. (#15408) Breaking changes: maximizebox and closebox are moved inside outerheader element. Change-Id: I909e3a012a632461ab20d51fab37602b1b6ceb12 --- client/src/com/vaadin/client/ui/VWindow.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'client/src') diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index eb3c89beb0..615841ccb6 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -392,8 +392,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, DOM.appendChild(wrapper, topTabStop); DOM.appendChild(wrapper, header); - DOM.appendChild(wrapper, maximizeRestoreBox); - DOM.appendChild(wrapper, closeBox); + DOM.appendChild(header, maximizeRestoreBox); + DOM.appendChild(header, closeBox); DOM.appendChild(header, headerText); DOM.appendChild(wrapper, contents); DOM.appendChild(wrapper, footer); @@ -620,9 +620,13 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, this.closable = closable; if (closable) { - closeBox.getStyle().clearDisplay(); + DOM.setElementProperty(closeBox, "className", CLASSNAME + + "-closebox"); + } else { - closeBox.getStyle().setDisplay(Display.NONE); + DOM.setElementProperty(closeBox, "className", CLASSNAME + + "-closebox " + CLASSNAME + "-closebox-disabled"); + } } -- cgit v1.2.3