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 | | ||||
34 | focus: true | 30 | focus: true | ||
35 | 31 | | |||
36 | cellWidth: iconSize + units.gridUnit | 32 | cellWidth: iconSize + Math.round(Kirigami.Units.gridUnit * 1.5) | ||
37 | cellHeight: cellWidth + Math.round(units.gridUnit * 2) | 33 | cellHeight: cellWidth + Math.round(Kirigami.Units.gridUnit * 2) | ||
38 | 34 | | |||
39 | cacheBuffer: 10000 | 35 | cacheBuffer: 20 | ||
40 | highlightMoveDuration: 0 | 36 | highlightMoveDuration: 0 | ||
41 | boundsBehavior: Flickable.StopAtBounds | 37 | boundsBehavior: Flickable.StopAtBounds | ||
42 | model: iconModel | 38 | model: iconModel | ||
43 | 39 | | |||
44 | highlight: Rectangle { | 40 | highlight: Item {} | ||
45 | color: theme.highlightColor | | |||
46 | //height: parent.height + units.gridUnit * 3 | | |||
47 | anchors.bottomMargin: -units.gridUnit * 2 | | |||
48 | } | | |||
49 | 41 | | |||
50 | delegate: IconGridDelegate {} | 42 | delegate: IconGridDelegate {} | ||
51 | 43 | | |||
52 | PlasmaComponents.BusyIndicator { | 44 | QQC2.BusyIndicator { | ||
53 | running: iconModel.loading | 45 | running: iconModel.loading | ||
54 | visible: running | 46 | visible: running | ||
55 | anchors.centerIn: parent | 47 | anchors.centerIn: parent | ||
56 | width: units.gridUnit * 8 | 48 | width: Kirigami.Units.gridUnit * 8 | ||
57 | height: width | 49 | height: width | ||
58 | } | 50 | } | ||
59 | } | 51 | } |