2 * Copyright (C) 2014-2015 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import Ubuntu.Components 1.3
24 // to be set from outside
25 property bool active: false
33 objectName: "closeWindowButton"
37 onClicked: root.close()
40 anchors.centerIn: parent
45 visible: parent.containsMouse
49 height: parent.height *.5
50 anchors.centerIn: parent
51 source: "graphics/window-close.svg"
52 color: root.active ? "white" : "#5d5d5d"
58 id: minimizeWindowButton
59 objectName: "minimizeWindowButton"
63 onClicked: root.minimize()
66 anchors.centerIn: parent
71 visible: parent.containsMouse
75 height: parent.height *.5
76 anchors.centerIn: parent
77 source: "graphics/window-minimize.svg"
78 color: root.active ? "white" : "#5d5d5d"
84 id: maximizeWindowButton
85 objectName: "maximizeWindowButton"
89 onClicked: root.maximize()
92 anchors.centerIn: parent
97 visible: parent.containsMouse
101 height: parent.height *.5
102 anchors.centerIn: parent
103 source: "graphics/window-maximize.svg"
104 color: root.active ? "white" : "#5d5d5d"