Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/explorer/WidgetExplorer.qml
Show First 20 Lines • Show All 299 Lines • ▼ Show 20 Line(s) | 288 | GridView { | |||
---|---|---|---|---|---|
300 | highlightMoveDuration: 0 | 300 | highlightMoveDuration: 0 | ||
301 | //highlightResizeDuration: 0 | 301 | //highlightResizeDuration: 0 | ||
302 | 302 | | |||
303 | //slide in to view from the left | 303 | //slide in to view from the left | ||
304 | add: Transition { | 304 | add: Transition { | ||
305 | NumberAnimation { | 305 | NumberAnimation { | ||
306 | properties: "x" | 306 | properties: "x" | ||
307 | from: -list.width | 307 | from: -list.width | ||
308 | to: 0 | | |||
309 | duration: units.shortDuration * 3 | 308 | duration: units.shortDuration * 3 | ||
310 | | ||||
311 | } | 309 | } | ||
312 | } | 310 | } | ||
313 | 311 | | |||
314 | //slide out of view to the right | 312 | //slide out of view to the right | ||
315 | remove: Transition { | 313 | remove: Transition { | ||
316 | NumberAnimation { | 314 | NumberAnimation { | ||
317 | properties: "x" | 315 | properties: "x" | ||
318 | to: list.width | 316 | to: list.width | ||
319 | duration: units.shortDuration * 3 | 317 | duration: units.shortDuration * 3 | ||
320 | } | 318 | } | ||
321 | } | 319 | } | ||
322 | 320 | | |||
323 | //if we are adding other items into the view use the same animation as normal adding | 321 | //if we are adding other items into the view use the same animation as normal adding | ||
324 | //this makes everything slide in together | 322 | //this makes everything slide in together | ||
325 | //if we make it move everything ends up weird | 323 | //if we make it move everything ends up weird | ||
326 | addDisplaced: list.add | 324 | addDisplaced: list.add | ||
327 | 325 | | |||
328 | //moved due to filtering | 326 | //moved due to filtering | ||
329 | displaced: Transition { | 327 | displaced: Transition { | ||
330 | NumberAnimation { | 328 | NumberAnimation { | ||
331 | properties: "y" | 329 | properties: "x,y" | ||
332 | duration: units.shortDuration * 3 | 330 | duration: units.shortDuration * 3 | ||
333 | } | 331 | } | ||
334 | } | 332 | } | ||
333 | | ||||
334 | PlasmaExtras.Heading { | ||||
335 | anchors.fill: parent | ||||
336 | anchors.margins: units.largeSpacing | ||||
337 | horizontalAlignment: Text.AlignHCenter | ||||
338 | verticalAlignment: Text.AlignVCenter | ||||
339 | wrapMode: Text.WordWrap | ||||
340 | level: 2 | ||||
341 | text: searchInput.text.length > 0 ? i18n("No widgets matched the search terms") : i18n("No widgets available") | ||||
342 | enabled: false | ||||
343 | visible: list.count == 0 | ||||
344 | } | ||||
335 | } | 345 | } | ||
336 | } | 346 | } | ||
337 | 347 | | |||
338 | Column { | 348 | Column { | ||
339 | id: bottomBar | 349 | id: bottomBar | ||
340 | anchors { | 350 | anchors { | ||
341 | left: parent.left | 351 | left: parent.left | ||
342 | right: parent.right | 352 | right: parent.right | ||
Show All 36 Lines |