summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-12-26 13:34:49 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-16 07:37:53 +0000
commit4b1bddf625a8d3aa4e7db3cb4a7c17c44138cf64 (patch)
treeb616a48160c9b16c8ca8f1e28cee1c7c12f8a9ae /client/src
parent09499a7d88e79ab25dde9a7c36a94b29f82be2b6 (diff)
downloadvaadin-framework-4b1bddf625a8d3aa4e7db3cb4a7c17c44138cf64.tar.gz
vaadin-framework-4b1bddf625a8d3aa4e7db3cb4a7c17c44138cf64.zip
Determine window header margin size depending on visible buttons.
(#15408) Breaking changes: maximizebox and closebox are moved inside outerheader element. Change-Id: I909e3a012a632461ab20d51fab37602b1b6ceb12
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java12
1 files changed, 8 insertions, 4 deletions
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");
+
}
}