@@ -19,13 +19,12 @@ import Ubuntu.Components 1.3
1919
2020Row {
2121 id: root
22− spacing: overlayShown ? units.gu(2) : units.gu(1)
22+ spacing: overlayShown ? units.gu(2) : windowIsMaximized ? 0 : units.gu(1)
2323 Behavior on spacing {
2424 UbuntuNumberAnimation {}
2525 }
2626
2727 // to be set from outside
28− property Item target
2928 property bool active: false
3029 property bool windowIsMaximized: false
3130 property bool closeButtonShown: true
@@ -49,13 +48,14 @@ Row {
4948
5049 Rectangle {
5150 anchors.fill: parent
51+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
5252 radius: height / 2
5353 color: theme.palette.normal.negative
5454 visible: parent.containsMouse && !overlayShown
5555 }
5656 Icon {
5757 anchors.fill: parent
58− anchors.margins: units.dp(3)
58+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
5959 source: "graphics/window-close.svg"
6060 color: root.active ? "white" : UbuntuColors.slate
6161 }
@@ -71,13 +71,14 @@ Row {
7171
7272 Rectangle {
7373 anchors.fill: parent
74+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
7475 radius: height / 2
7576 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
7677 visible: parent.containsMouse && !overlayShown
7778 }
7879 Icon {
7980 anchors.fill: parent
80− anchors.margins: units.dp(3)
81+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
8182 source: "graphics/window-minimize.svg"
8283 color: root.active ? "white" : UbuntuColors.slate
8384 }
@@ -103,13 +104,14 @@ Row {
103104
104105 Rectangle {
105106 anchors.fill: parent
107+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
106108 radius: height / 2
107109 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
108110 visible: parent.containsMouse && !overlayShown
109111 }
110112 Icon {
111113 anchors.fill: parent
112− anchors.margins: units.dp(3)
114+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
113115 source: root.windowIsMaximized ? "graphics/window-window.svg" : "graphics/window-maximize.svg"
114116 color: root.active ? "white" : UbuntuColors.slate
115117 }