Changeset View
Changeset View
Standalone View
Standalone View
src/qtquick/qml/Page.qml
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 198 | onItemPicked: { | |||
---|---|---|---|---|---|
199 | newStuffModel.installItem(entryId, downloadItemId); | 199 | newStuffModel.installItem(entryId, downloadItemId); | ||
200 | } | 200 | } | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | view.implicitCellWidth: root.viewMode == Page.ViewMode.Tiles ? Kirigami.Units.gridUnit * 30 : (root.viewMode == Page.ViewMode.Preview ? Kirigami.Units.gridUnit * 25 : Kirigami.Units.gridUnit * 10) | 203 | view.implicitCellWidth: root.viewMode == Page.ViewMode.Tiles ? Kirigami.Units.gridUnit * 30 : (root.viewMode == Page.ViewMode.Preview ? Kirigami.Units.gridUnit * 25 : Kirigami.Units.gridUnit * 10) | ||
204 | view.implicitCellHeight: root.viewMode == Page.ViewMode.Tiles ? Math.round(view.implicitCellWidth / 3) : (root.viewMode == Page.ViewMode.Preview ? Kirigami.Units.gridUnit * 25 : Math.round(view.implicitCellWidth / 1.6) + Kirigami.Units.gridUnit*2) | 204 | view.implicitCellHeight: root.viewMode == Page.ViewMode.Tiles ? Math.round(view.implicitCellWidth / 3) : (root.viewMode == Page.ViewMode.Preview ? Kirigami.Units.gridUnit * 25 : Math.round(view.implicitCellWidth / 1.6) + Kirigami.Units.gridUnit*2) | ||
205 | view.delegate: root.viewMode == Page.ViewMode.Tiles ? tileDelegate : (root.viewMode == Page.ViewMode.Preview ? bigPreviewDelegate : thumbDelegate) | 205 | view.delegate: root.viewMode == Page.ViewMode.Tiles ? tileDelegate : (root.viewMode == Page.ViewMode.Preview ? bigPreviewDelegate : thumbDelegate) | ||
206 | 206 | | |||
207 | view.footer: Item { | ||||
208 | width: GridView.view.width | ||||
209 | height: GridView.view.count > 0 ? Kirigami.Units.gridUnit * 3 : GridView.view.height | ||||
210 | Behavior on height { NumberAnimation { duration: Kirigami.Units.shortDuration; } } | ||||
211 | visible: opacity > 0 | ||||
212 | opacity: newStuffModel.isLoadingData && !newStuffEngine.isLoading ? 1 : 0 | ||||
213 | Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration; } } | ||||
214 | QtControls.BusyIndicator { | ||||
215 | anchors { | ||||
216 | top: parent.top | ||||
217 | right: parent.horizontalCenter | ||||
218 | bottom: parent.bottom | ||||
219 | margins: Kirigami.Units.smallSpacing | ||||
220 | } | ||||
221 | width: Kirigami.Units.gridUnit * 3 - Kirigami.Units.smallSpacing * 2 | ||||
222 | running: parent.visible | ||||
223 | QtControls.Label { | ||||
224 | anchors { | ||||
225 | top: parent.top | ||||
226 | left: parent.right | ||||
227 | leftMargin: Kirigami.Units.largeSpacing | ||||
228 | bottom: parent.bottom | ||||
229 | } | ||||
230 | text: i18nc("A text shown beside a busy indicator suggesting that data is being fetched", "Loading more...") | ||||
231 | verticalAlignment: Text.AlignVCenter | ||||
232 | } | ||||
233 | } | ||||
234 | } | ||||
235 | | ||||
207 | Component { | 236 | Component { | ||
208 | id: bigPreviewDelegate | 237 | id: bigPreviewDelegate | ||
209 | EntryGridDelegates.BigPreviewDelegate { } | 238 | EntryGridDelegates.BigPreviewDelegate { } | ||
210 | } | 239 | } | ||
211 | Component { | 240 | Component { | ||
212 | id: tileDelegate | 241 | id: tileDelegate | ||
213 | EntryGridDelegates.TileDelegate { | 242 | EntryGridDelegates.TileDelegate { | ||
214 | useLabel: root.useLabel | 243 | useLabel: root.useLabel | ||
Show All 16 Lines |