Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/FullRepresentation.qml
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Line(s) | 282 | ListView { | |||
---|---|---|---|---|---|
391 | 391 | | |||
392 | // This is so the delegates can detect the change in "isInGroup" and show a separator | 392 | // This is so the delegates can detect the change in "isInGroup" and show a separator | ||
393 | section { | 393 | section { | ||
394 | property: "isInGroup" | 394 | property: "isInGroup" | ||
395 | criteria: ViewSection.FullString | 395 | criteria: ViewSection.FullString | ||
396 | } | 396 | } | ||
397 | 397 | | |||
398 | delegate: DraggableDelegate { | 398 | delegate: DraggableDelegate { | ||
399 | id: delegate | ||||
399 | width: list.width | 400 | width: list.width | ||
400 | contentItem: delegateLoader | 401 | contentItem: delegateLoader | ||
401 | 402 | | |||
402 | draggable: !model.isGroup && model.type != NotificationManager.Notifications.JobType | 403 | draggable: !model.isGroup && model.type != NotificationManager.Notifications.JobType | ||
403 | 404 | | |||
404 | onDismissRequested: { | 405 | onDismissRequested: { | ||
405 | // Setting the animation target explicitly before removing the notification: | 406 | // Setting the animation target explicitly before removing the notification: | ||
406 | // Using ViewTransition.item.x to get the x position in the animation | 407 | // Using ViewTransition.item.x to get the x position in the animation | ||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 447 | ColumnLayout { | |||
558 | 559 | | |||
559 | PlasmaComponents.ToolButton { | 560 | PlasmaComponents.ToolButton { | ||
560 | Layout.preferredWidth: minimumWidth | 561 | Layout.preferredWidth: minimumWidth | ||
561 | iconName: model.isGroupExpanded ? "arrow-up" : "arrow-down" | 562 | iconName: model.isGroupExpanded ? "arrow-up" : "arrow-down" | ||
562 | text: model.isGroupExpanded ? i18n("Show Fewer") | 563 | text: model.isGroupExpanded ? i18n("Show Fewer") | ||
563 | : i18nc("Expand to show n more notifications", | 564 | : i18nc("Expand to show n more notifications", | ||
564 | "Show %1 More", (model.groupChildrenCount - model.expandedGroupChildrenCount)) | 565 | "Show %1 More", (model.groupChildrenCount - model.expandedGroupChildrenCount)) | ||
565 | visible: (model.groupChildrenCount > model.expandedGroupChildrenCount || model.isGroupExpanded) | 566 | visible: (model.groupChildrenCount > model.expandedGroupChildrenCount || model.isGroupExpanded) | ||
566 | && delegateLoader.ListView.nextSection !== delegateLoader.ListView.section | 567 | && delegate.ListView.nextSection !== delegate.ListView.section | ||
567 | onClicked: list.setGroupExpanded(model.index, !model.isGroupExpanded) | 568 | onClicked: list.setGroupExpanded(model.index, !model.isGroupExpanded) | ||
568 | } | 569 | } | ||
569 | 570 | | |||
570 | PlasmaCore.SvgItem { | 571 | PlasmaCore.SvgItem { | ||
571 | Layout.fillWidth: true | 572 | Layout.fillWidth: true | ||
572 | Layout.bottomMargin: units.smallSpacing | 573 | Layout.bottomMargin: units.smallSpacing | ||
573 | elementId: "horizontal-line" | 574 | elementId: "horizontal-line" | ||
574 | svg: lineSvg | 575 | svg: lineSvg | ||
575 | 576 | | |||
576 | // property is only atached to the delegate itself (the Loader in our case) | 577 | // property is only atached to the delegate itself (the Loader in our case) | ||
577 | visible: (!model.isInGroup || delegateLoader.ListView.nextSection !== delegateLoader.ListView.section) | 578 | visible: (!model.isInGroup || delegate.ListView.nextSection !== delegate.ListView.section) | ||
578 | && delegateLoader.ListView.nextSection !== "" // don't show after last item | 579 | && delegate.ListView.nextSection !== "" // don't show after last item | ||
579 | } | 580 | } | ||
580 | } | 581 | } | ||
581 | } | 582 | } | ||
582 | } | 583 | } | ||
583 | } | 584 | } | ||
584 | 585 | | |||
585 | PlasmaExtras.Heading { | 586 | PlasmaExtras.Heading { | ||
586 | width: list.width | 587 | width: list.width | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |