Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/FullRepresentation.qml
Show All 34 Lines | |||||
35 | import "global" | 35 | import "global" | ||
36 | 36 | | |||
37 | PlasmaComponents3.Page { | 37 | PlasmaComponents3.Page { | ||
38 | // TODO these should be configurable in the future | 38 | // TODO these should be configurable in the future | ||
39 | readonly property int dndMorningHour: 6 | 39 | readonly property int dndMorningHour: 6 | ||
40 | readonly property int dndEveningHour: 20 | 40 | readonly property int dndEveningHour: 20 | ||
41 | Layout.fillHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical | 41 | Layout.fillHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical | ||
42 | 42 | | |||
43 | // HACK forward focus to the list | ||||
44 | onActiveFocusChanged: { | ||||
45 | if (activeFocus) { | ||||
46 | list.forceActiveFocus(); | ||||
47 | } | ||||
48 | } | ||||
49 | | ||||
50 | Connections { | ||||
51 | target: plasmoid | ||||
52 | onExpandedChanged: { | ||||
53 | if (plasmoid.expanded) { | ||||
54 | list.positionViewAtBeginning(); | ||||
55 | list.currentIndex = -1; | ||||
56 | } | ||||
57 | } | ||||
58 | } | ||||
59 | | ||||
60 | PlasmaCore.Svg { | ||||
61 | id: lineSvg | ||||
62 | imagePath: "widgets/line" | ||||
63 | } | ||||
64 | | ||||
43 | header: PlasmaExtras.PlasmoidHeading { | 65 | header: PlasmaExtras.PlasmoidHeading { | ||
44 | ColumnLayout { | 66 | ColumnLayout { | ||
45 | anchors.fill: parent | 67 | anchors.fill: parent | ||
46 | id: header | 68 | id: header | ||
47 | visible: !Kirigami.Settings.isMobile | 69 | visible: !Kirigami.Settings.isMobile | ||
48 | Layout.fillWidth: true | 70 | Layout.fillWidth: true | ||
49 | Layout.leftMargin: units.smallSpacing | 71 | Layout.leftMargin: units.smallSpacing | ||
50 | spacing: 0 | 72 | spacing: 0 | ||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 263 | ColumnLayout{ | |||
243 | //Layout.preferredWidth: units.gridUnit * 18 | 265 | //Layout.preferredWidth: units.gridUnit * 18 | ||
244 | //Layout.preferredHeight: units.gridUnit * 24 | 266 | //Layout.preferredHeight: units.gridUnit * 24 | ||
245 | //Layout.minimumWidth: units.gridUnit * 10 | 267 | //Layout.minimumWidth: units.gridUnit * 10 | ||
246 | //Layout.minimumHeight: units.gridUnit * 15 | 268 | //Layout.minimumHeight: units.gridUnit * 15 | ||
247 | anchors.fill: parent | 269 | anchors.fill: parent | ||
248 | 270 | | |||
249 | spacing: units.smallSpacing | 271 | spacing: units.smallSpacing | ||
250 | 272 | | |||
251 | // HACK forward focus to the list | | |||
252 | onActiveFocusChanged: { | | |||
253 | if (activeFocus) { | | |||
254 | list.forceActiveFocus(); | | |||
255 | } | | |||
256 | } | | |||
257 | | ||||
258 | Connections { | | |||
259 | target: plasmoid | | |||
260 | onExpandedChanged: { | | |||
261 | if (plasmoid.expanded) { | | |||
262 | list.positionViewAtBeginning(); | | |||
263 | list.currentIndex = -1; | | |||
264 | } | | |||
265 | } | | |||
266 | } | | |||
267 | | ||||
268 | // actual notifications | 273 | // actual notifications | ||
269 | PlasmaExtras.ScrollArea { | 274 | PlasmaExtras.ScrollArea { | ||
270 | Layout.fillWidth: true | 275 | Layout.fillWidth: true | ||
271 | Layout.fillHeight: true | 276 | Layout.fillHeight: true | ||
272 | Layout.preferredWidth: units.gridUnit * 18 | 277 | Layout.preferredWidth: units.gridUnit * 18 | ||
273 | Layout.preferredHeight: units.gridUnit * 24 | 278 | Layout.preferredHeight: units.gridUnit * 24 | ||
274 | Layout.leftMargin: units.smallSpacing | 279 | Layout.leftMargin: units.smallSpacing | ||
275 | 280 | | |||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | 450 | Item { | |||
446 | id: groupLineContainer | 451 | id: groupLineContainer | ||
447 | Layout.fillHeight: true | 452 | Layout.fillHeight: true | ||
448 | Layout.topMargin: units.smallSpacing | 453 | Layout.topMargin: units.smallSpacing | ||
449 | width: units.iconSizes.small | 454 | width: units.iconSizes.small | ||
450 | visible: model.isInGroup | 455 | visible: model.isInGroup | ||
451 | 456 | | |||
452 | PlasmaCore.SvgItem { | 457 | PlasmaCore.SvgItem { | ||
453 | elementId: "vertical-line" | 458 | elementId: "vertical-line" | ||
454 | svg: lineSvg | 459 | svg: lineSvg | ||
broulik: Move the `Svg` somewhere outside the delegate, I don't want multiple instances of it | |||||
I'm a bit confused here. The PlasmaCore.svg{id: lineSvg...} element was inside a different PlasmaCore.SvgItem that I removed. So what I did was essentially to move it from that SvgItem to this SvgItem. That one is the only instance of PlasmaCore.Svg. niccolove: I'm a bit confused here. The PlasmaCore.svg{id: lineSvg...} element was inside a different… | |||||
455 | anchors.horizontalCenter: parent.horizontalCenter | 460 | anchors.horizontalCenter: parent.horizontalCenter | ||
456 | width: units.iconSizes.small | 461 | width: units.iconSizes.small | ||
457 | height: parent.height | 462 | height: parent.height | ||
458 | } | 463 | } | ||
459 | } | 464 | } | ||
460 | 465 | | |||
461 | NotificationItem { | 466 | NotificationItem { | ||
462 | Layout.fillWidth: true | 467 | Layout.fillWidth: true | ||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |
Move the Svg somewhere outside the delegate, I don't want multiple instances of it