@@ -19,13 +19,12 @@ import Ubuntu.Components 1.3
22− spacing: overlayShown ? units.gu(2) : units.gu(1)
22+ spacing: overlayShown ? units.gu(2) : windowIsMaximized ? 0 : units.gu(1)
23 Behavior on spacing {
23 Behavior on spacing {
24 UbuntuNumberAnimation {}
24 UbuntuNumberAnimation {}
27 // to be set from outside
27 // to be set from outside
29 property bool active: false
28 property bool active: false
30 property bool windowIsMaximized: false
29 property bool windowIsMaximized: false
31 property bool closeButtonShown: true
30 property bool closeButtonShown: true
@@ -49,13 +48,14 @@ Row {
50 Rectangle {
49 Rectangle {
51 anchors.fill: parent
50 anchors.fill: parent
51+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
52 radius: height / 2
52 radius: height / 2
53 color: theme.palette.normal.negative
53 color: theme.palette.normal.negative
54 visible: parent.containsMouse && !overlayShown
54 visible: parent.containsMouse && !overlayShown
57 anchors.fill: parent
57 anchors.fill: parent
58− anchors.margins: units.dp(3)
58+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
59 source: "graphics/window-close.svg"
59 source: "graphics/window-close.svg"
60 color: root.active ? "white" : UbuntuColors.slate
60 color: root.active ? "white" : UbuntuColors.slate
@@ -71,13 +71,14 @@ Row {
72 Rectangle {
72 Rectangle {
73 anchors.fill: parent
73 anchors.fill: parent
74+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
74 radius: height / 2
75 radius: height / 2
75 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
76 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
76 visible: parent.containsMouse && !overlayShown
77 visible: parent.containsMouse && !overlayShown
79 anchors.fill: parent
80 anchors.fill: parent
80− anchors.margins: units.dp(3)
81+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
81 source: "graphics/window-minimize.svg"
82 source: "graphics/window-minimize.svg"
82 color: root.active ? "white" : UbuntuColors.slate
83 color: root.active ? "white" : UbuntuColors.slate
@@ -103,13 +104,14 @@ Row {
104 Rectangle {
105 Rectangle {
105 anchors.fill: parent
106 anchors.fill: parent
107+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
106 radius: height / 2
108 radius: height / 2
107 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
109 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
108 visible: parent.containsMouse && !overlayShown
110 visible: parent.containsMouse && !overlayShown
111 anchors.fill: parent
113 anchors.fill: parent
112− anchors.margins: units.dp(3)
114+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
113 source: root.windowIsMaximized ? "graphics/window-window.svg" : "graphics/window-maximize.svg"
115 source: root.windowIsMaximized ? "graphics/window-window.svg" : "graphics/window-maximize.svg"
114 color: root.active ? "white" : UbuntuColors.slate
116 color: root.active ? "white" : UbuntuColors.slate