@@ -18,6 +18,7 @@ import QtQuick 2.2
18import Ubuntu.Components 1.1
18import Ubuntu.Components 1.1
19import Unity.Application 0.1
19import Unity.Application 0.1
20import "../Components"
20import "../Components"
21+import "../Components/PanelState"
21import ".."
22import ".."
@@ -123,7 +124,7 @@ Item {
125 shown: false
126 shown: false
126− width: root.width
127+ width: root.width - (PanelState.buttonsVisible ? windowControlButtons.width : 0)
127 minimizedPanelHeight: units.gu(3)
128 minimizedPanelHeight: units.gu(3)
128 expandedPanelHeight: units.gu(7)
129 expandedPanelHeight: units.gu(7)
129 openedHeight: root.height - indicatorOrangeLine.height
130 openedHeight: root.height - indicatorOrangeLine.height
@@ -148,6 +149,20 @@ Item {
152+ WindowControlButtons {
153+ id: windowControlButtons
157+ margins: units.gu(0.7)
159+ height: indicators.minimizedPanelHeight - anchors.margins * 2
160+ visible: PanelState.buttonsVisible
161+ onClose: PanelState.close()
162+ onMinimize: PanelState.minimize()
163+ onMaximize: PanelState.maximize()
151 PanelSeparatorLine {
166 PanelSeparatorLine {
152 id: indicatorOrangeLine
167 id: indicatorOrangeLine
153 anchors {
168 anchors {
@@ -161,7 +176,7 @@ Item {
161 id: __callHint
176 id: __callHint
162 anchors {
177 anchors {
163 top: parent.top
178 top: parent.top
164− left: parent.left
179+ left: PanelState.buttonsVisible ? windowControlButtons.right : parent.left
166 height: indicators.minimizedPanelHeight
181 height: indicators.minimizedPanelHeight
167 visible: active && indicators.state == "initial"
182 visible: active && indicators.state == "initial"