on xenial help sign in
add copyright headers
a59daa5Michael Zanetti
qml/Stage/Spread/BezierCurve.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
3import QtQuick.Window 2.2
19import QtQuick.Window 2.2
qml/Stage/Spread/KeySpline.js+3−2
@@ -1,5 +1,3 @@
1−.pragma library
2−
3/** MIT License
1/** MIT License
4 *
2 *
5 * KeySpline - use bezier curve for transition easing function
3 * KeySpline - use bezier curve for transition easing function
@@ -30,6 +28,9 @@
30* var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)
28* var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)
31* spline.get(x) => returns the easing value | x must be in [0, 1] range
29* spline.get(x) => returns the easing value | x must be in [0, 1] range
32*/
30*/
31+
32+.pragma library
33+
33function keySpline (mX1, mY1, mX2, mY2) {
34function keySpline (mX1, mY1, mX2, mY2) {
34
35
35 this.get = function(aX) {
36 this.get = function(aX) {
qml/Stage/Spread/MathUtils.js+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1.pragma library
17.pragma library
2
18
3/**
19/**
qml/Stage/Spread/OpacityMask.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2
18
3Item {
19Item {
qml/Stage/Spread/Spread.qml+16−10
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
3import "MathUtils.js" as MathUtils
19import "MathUtils.js" as MathUtils
@@ -92,8 +108,6 @@ Item {
92 elide: Qt.ElideMiddle
108 elide: Qt.ElideMiddle
93 anchors.horizontalCenter: parent.horizontalCenter
109 anchors.horizontalCenter: parent.horizontalCenter
94 y: windowTitleTopMargin
110 y: windowTitleTopMargin
95−// //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
96−// visible: height < priv.contentTopMargin
97 readonly property var highlightedSurface: root.model ? root.model.surfaceAt(root.highlightedIndex) : null
111 readonly property var highlightedSurface: root.model ? root.model.surfaceAt(root.highlightedIndex) : null
98 readonly property var highlightedApp: root.model ? root.model.applicationAt(root.highlightedIndex) : null
112 readonly property var highlightedApp: root.model ? root.model.applicationAt(root.highlightedIndex) : null
99 text: root.highlightedIndex >= 0 && highlightedSurface && highlightedSurface.name != "" ? highlightedSurface.name :
113 text: root.highlightedIndex >= 0 && highlightedSurface && highlightedSurface.name != "" ? highlightedSurface.name :
@@ -135,10 +149,6 @@ Item {
135
149
136 highlightedIndex = (highlightedIndex + 1) % totalItemCount;
150 highlightedIndex = (highlightedIndex + 1) % totalItemCount;
137 spreadFlickable.snap(highlightedIndex)
151 spreadFlickable.snap(highlightedIndex)
138−// var newContentX = (spreadTotalWidth / (totalItemCount + 1)) * Math.max(0, Math.min(totalItemCount - visibleItemCount, highlightedIndex - 1));
139−// if (spreadFlickable.contentX < newContentX || highlightedIndex == 0) {
140−// spreadFlickable.snap(newContentX);
141−// }
142 }
152 }
143
153
144 function selectPrevious(isAutoRepeat) {
154 function selectPrevious(isAutoRepeat) {
@@ -148,9 +158,5 @@ Item {
148
158
149 highlightedIndex = highlightedIndex - 1 >= 0 ? highlightedIndex - 1 : totalItemCount - 1;
159 highlightedIndex = highlightedIndex - 1 >= 0 ? highlightedIndex - 1 : totalItemCount - 1;
150 spreadFlickable.snap(highlightedIndex)
160 spreadFlickable.snap(highlightedIndex)
151−// var newContentX = (spreadFlickable.contentWidth / (totalItemCount + 1)) * Math.max(0, Math.min(totalItemCount - visibleItemCount, highlightedIndex - 1));
152−// if (spreadFlickable.contentX > newContentX || highlightedIndex == totalItemCount - 1) {
153−// spreadFlickable.snap(newContentX)
154−// }
155 }
161 }
156}
162}
qml/Stage/Spread/SpreadDelegateInputArea.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
3import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
qml/Stage/Spread/SpreadMaths.qml+1−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
qml/Stage/Spread/StagedRightEdgeMaths.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
3import Unity.Application 0.1
19import Unity.Application 0.1
qml/Stage/Spread/WindowedRightEdgeMaths.qml+16
@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2016 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+
1import QtQuick 2.4
17import QtQuick 2.4
2import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
3import Unity.Application 0.1
19import Unity.Application 0.1
qml/Stage/Spread/cubic-bezier.js+15
@@ -1,3 +1,18 @@
1+/*
2+ * Copyright (C) 2016 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+ */
1
16
2//====================================\\
17//====================================\\
3// 13thParallel.org Beziér Curve Code \\
18// 13thParallel.org Beziér Curve Code \\