on xenial help sign in
add copyright headers
commita59daa54cf5c4ae1046df3b0e0c6d959e1c2ded3 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 20 Sep 2016, 14:03 (10 years ago) parent461f9ec
10 files changed+131−13
qml/Stage/Spread/BezierCurve.qml+16 qml/Stage/Spread/KeySpline.js+3−2 qml/Stage/Spread/MathUtils.js+16 qml/Stage/Spread/OpacityMask.qml+16 qml/Stage/Spread/Spread.qml+16−10 qml/Stage/Spread/SpreadDelegateInputArea.qml+16 qml/Stage/Spread/SpreadMaths.qml+1−1 qml/Stage/Spread/StagedRightEdgeMaths.qml+16 qml/Stage/Spread/WindowedRightEdgeMaths.qml+16 qml/Stage/Spread/cubic-bezier.js+15
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+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import QtQuick.Window 2.2
qml/Stage/Spread/KeySpline.js+3−2
@@ -1,5 +1,3 @@
1−.pragma library
2−
31/** MIT License
42 *
53 * KeySpline - use bezier curve for transition easing function
@@ -30,6 +28,9 @@
3028* var spline = new KeySpline(0.25, 0.1, 0.25, 1.0)
3129* spline.get(x) => returns the easing value | x must be in [0, 1] range
3230*/
31+
32+.pragma library
33+
3334function keySpline (mX1, mY1, mX2, mY2) {
3435
3536 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+
117.pragma library
218
319/**
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+
117import QtQuick 2.4
218
319Item {
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+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import "MathUtils.js" as MathUtils
@@ -92,8 +108,6 @@ Item {
92108 elide: Qt.ElideMiddle
93109 anchors.horizontalCenter: parent.horizontalCenter
94110 y: windowTitleTopMargin
95−// //y: priv.spreadTopMargin + priv.contentTopMargin + settings.spreadOffset + settings.titleOffset - height - (priv.contentTopMargin - height) / 4
96−// visible: height < priv.contentTopMargin
97111 readonly property var highlightedSurface: root.model ? root.model.surfaceAt(root.highlightedIndex) : null
98112 readonly property var highlightedApp: root.model ? root.model.applicationAt(root.highlightedIndex) : null
99113 text: root.highlightedIndex >= 0 && highlightedSurface && highlightedSurface.name != "" ? highlightedSurface.name :
@@ -135,10 +149,6 @@ Item {
135149
136150 highlightedIndex = (highlightedIndex + 1) % totalItemCount;
137151 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−// }
142152 }
143153
144154 function selectPrevious(isAutoRepeat) {
@@ -148,9 +158,5 @@ Item {
148158
149159 highlightedIndex = highlightedIndex - 1 >= 0 ? highlightedIndex - 1 : totalItemCount - 1;
150160 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−// }
155161 }
156162}
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+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import Ubuntu.Gestures 0.1
qml/Stage/Spread/SpreadMaths.qml+1−1
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2016 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * 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+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import 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+
117import QtQuick 2.4
218import Ubuntu.Components 1.3
319import 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+ */
116
217//====================================\\
318// 13thParallel.org Beziér Curve Code \\