@@ -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}