Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/IconGrid.qml
- This file was copied to cuttlefish/package/contents/ui/GlobalMenuBar.qml.
Show All 13 Lines | |||||
14 | * * | 14 | * * | ||
15 | * You should have received a copy of the GNU General Public License * | 15 | * You should have received a copy of the GNU General Public License * | ||
16 | * along with this program; if not, write to the * | 16 | * along with this program; if not, write to the * | ||
17 | * Free Software Foundation, Inc., * | 17 | * Free Software Foundation, Inc., * | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
19 | * * | 19 | * * | ||
20 | ***************************************************************************/ | 20 | ***************************************************************************/ | ||
21 | 21 | | |||
22 | import QtQuick 2.2 | 22 | import QtQuick 2.5 | ||
23 | // import QtQuick.Controls 1.0 | 23 | import QtQuick.Controls 2.5 as QQC2 | ||
24 | import QtQuick.Layouts 1.0 | 24 | import QtQuick.Layouts 1.0 | ||
25 | 25 | | |||
26 | import org.kde.plasma.core 2.0 as PlasmaCore | 26 | import org.kde.kirigami 2.8 as Kirigami | ||
27 | import org.kde.plasma.components 2.0 as PlasmaComponents | | |||
28 | import org.kde.plasma.extras 2.0 as PlasmaExtras | | |||
29 | | ||||
30 | 27 | | |||
31 | GridView { | 28 | GridView { | ||
32 | id: iconGrid | 29 | id: iconGrid | ||
33 | 30 | | |||
34 | focus: true | 31 | focus: true | ||
35 | 32 | | |||
36 | cellWidth: iconSize + units.gridUnit | 33 | cellWidth: iconSize + Kirigami.Units.gridUnit | ||
37 | cellHeight: cellWidth + Math.round(units.gridUnit * 2) | 34 | cellHeight: cellWidth + Math.round(Kirigami.Units.gridUnit * 2) | ||
38 | 35 | | |||
39 | cacheBuffer: 10000 | 36 | cacheBuffer: 20 | ||
40 | highlightMoveDuration: 0 | 37 | highlightMoveDuration: 0 | ||
41 | boundsBehavior: Flickable.StopAtBounds | 38 | boundsBehavior: Flickable.StopAtBounds | ||
42 | model: iconModel | 39 | model: iconModel | ||
43 | 40 | | |||
44 | highlight: Rectangle { | 41 | highlight: Rectangle { | ||
45 | color: theme.highlightColor | 42 | color: theme.highlightColor | ||
46 | //height: parent.height + units.gridUnit * 3 | 43 | anchors.bottomMargin: -Kirigami.Units.gridUnit * 2 | ||
47 | anchors.bottomMargin: -units.gridUnit * 2 | | |||
48 | } | 44 | } | ||
49 | 45 | | |||
50 | delegate: IconGridDelegate {} | 46 | delegate: IconGridDelegate {} | ||
51 | 47 | | |||
52 | PlasmaComponents.BusyIndicator { | 48 | QQC2.BusyIndicator { | ||
53 | running: iconModel.loading | 49 | running: iconModel.loading | ||
54 | visible: running | 50 | visible: running | ||
55 | anchors.centerIn: parent | 51 | anchors.centerIn: parent | ||
56 | width: units.gridUnit * 8 | 52 | width: Kirigami.Units.gridUnit * 8 | ||
57 | height: width | 53 | height: width | ||
58 | } | 54 | } | ||
59 | } | 55 | } |