Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/qml/Previews.qml
Show All 27 Lines | 26 | ScrollView { | |||
---|---|---|---|---|---|
28 | frameVisible: true | 28 | frameVisible: true | ||
29 | GridView { | 29 | GridView { | ||
30 | id: gridView | 30 | id: gridView | ||
31 | objectName: "listView" | 31 | objectName: "listView" | ||
32 | model: decorationsModel | 32 | model: decorationsModel | ||
33 | cellWidth: 20 * units.gridUnit | 33 | cellWidth: 20 * units.gridUnit | ||
34 | cellHeight: cellWidth / 1.6 | 34 | cellHeight: cellWidth / 1.6 | ||
35 | onContentHeightChanged: { | 35 | onContentHeightChanged: { | ||
36 | if (gridView.currentIndex == -1) { | ||||
36 | gridView.currentIndex = savedIndex; | 37 | gridView.currentIndex = savedIndex; | ||
38 | } | ||||
37 | gridView.positionViewAtIndex(gridView.currentIndex, GridView.Visible); | 39 | gridView.positionViewAtIndex(gridView.currentIndex, GridView.Visible); | ||
38 | } | 40 | } | ||
39 | 41 | | |||
40 | Rectangle { | 42 | Rectangle { | ||
41 | z: -1 | 43 | z: -1 | ||
42 | anchors.fill: parent | 44 | anchors.fill: parent | ||
43 | color: baseColor | 45 | color: baseColor | ||
44 | } | 46 | } | ||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |