on 8930f96 help sign in
unity8/qml/Components/WindowControlButtons.qml
63 lines 2.1 kB history raw
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 *
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
19import QtQuick 2.3
20import Ubuntu.Components 1.1
22Row {
23 id: root
24 spacing: units.gu(0.5)
26 signal close()
27 signal minimize()
28 signal maximize()
30 Rectangle {
31 objectName: "closeWindowButton"
32 height: parent.height; width: height; radius: height / 2
33 gradient: Gradient {
34 GradientStop { color: "#F49073"; position: 0 }
35 GradientStop { color: "#DF4F1C"; position: 1 }
36 }
37 border.width: units.dp(.5)
38 border.color: "black"
39 MouseArea { anchors.fill: parent; onClicked: root.close() }
40 }
41 Rectangle {
42 objectName: "minimizeWindowButton"
43 height: parent.height; width: height; radius: height / 2
44 gradient: Gradient {
45 GradientStop { color: "#92918C"; position: 0 }
46 GradientStop { color: "#5E5D58"; position: 1 }
47 }
48 border.width: units.dp(.5)
49 border.color: "black"
50 MouseArea { anchors.fill: parent; onClicked: root.minimize() }
51 }
52 Rectangle {
53 objectName: "maximizeWindowButton"
54 height: parent.height; width: height; radius: height / 2
55 gradient: Gradient {
56 GradientStop { color: "#92918C"; position: 0 }
57 GradientStop { color: "#5E5D58"; position: 1 }
58 }
59 border.width: units.dp(.5)
60 border.color: "black"
61 MouseArea { anchors.fill: parent; onClicked: root.maximize() }
62 }