Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationItem.qml
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 33 | ColumnLayout { | |||
---|---|---|---|---|---|
77 | property int thumbnailLeftPadding: 0 | 77 | property int thumbnailLeftPadding: 0 | ||
78 | property int thumbnailRightPadding: 0 | 78 | property int thumbnailRightPadding: 0 | ||
79 | property int thumbnailTopPadding: 0 | 79 | property int thumbnailTopPadding: 0 | ||
80 | property int thumbnailBottomPadding: 0 | 80 | property int thumbnailBottomPadding: 0 | ||
81 | 81 | | |||
82 | readonly property bool menuOpen: bodyLabel.contextMenu !== null | 82 | readonly property bool menuOpen: bodyLabel.contextMenu !== null | ||
83 | || (thumbnailStripLoader.item && thumbnailStripLoader.item.menuOpen) | 83 | || (thumbnailStripLoader.item && thumbnailStripLoader.item.menuOpen) | ||
84 | || (jobLoader.item && jobLoader.item.menuOpen) | 84 | || (jobLoader.item && jobLoader.item.menuOpen) | ||
85 | readonly property bool dragging: thumbnailStripLoader.item && thumbnailStripLoader.item.dragging | 85 | readonly property bool dragging: (thumbnailStripLoader.item && thumbnailStripLoader.item.dragging) | ||
86 | || (jobLoader.item && jobLoader.item.dragging) | ||||
86 | 87 | | |||
87 | signal bodyClicked(var mouse) | 88 | signal bodyClicked(var mouse) | ||
88 | signal closeClicked | 89 | signal closeClicked | ||
89 | signal configureClicked | 90 | signal configureClicked | ||
90 | signal dismissClicked | 91 | signal dismissClicked | ||
91 | signal actionInvoked(string actionName) | 92 | signal actionInvoked(string actionName) | ||
92 | signal openUrl(string url) | 93 | signal openUrl(string url) | ||
93 | signal fileActionInvoked | 94 | signal fileActionInvoked | ||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 239 | KQCAddons.QImageItem { | |||
239 | id: imageItem | 240 | id: imageItem | ||
240 | readonly property bool active: !null && nativeWidth > 0 | 241 | readonly property bool active: !null && nativeWidth > 0 | ||
241 | anchors.fill: parent | 242 | anchors.fill: parent | ||
242 | smooth: true | 243 | smooth: true | ||
243 | fillMode: KQCAddons.QImageItem.PreserveAspectFit | 244 | fillMode: KQCAddons.QImageItem.PreserveAspectFit | ||
244 | visible: active | 245 | visible: active | ||
245 | image: typeof notificationItem.icon === "object" ? notificationItem.icon : undefined | 246 | image: typeof notificationItem.icon === "object" ? notificationItem.icon : undefined | ||
246 | } | 247 | } | ||
248 | | ||||
249 | // JobItem reparents a file icon here for finished jobs with one total file | ||||
247 | } | 250 | } | ||
248 | } | 251 | } | ||
249 | 252 | | |||
250 | // Job progress reporting | 253 | // Job progress reporting | ||
251 | Loader { | 254 | Loader { | ||
252 | id: jobLoader | 255 | id: jobLoader | ||
253 | Layout.fillWidth: true | 256 | Layout.fillWidth: true | ||
254 | active: notificationItem.notificationType === NotificationManager.Notifications.JobType | 257 | active: notificationItem.notificationType === NotificationManager.Notifications.JobType | ||
255 | visible: active | 258 | visible: active | ||
256 | sourceComponent: JobItem { | 259 | sourceComponent: JobItem { | ||
260 | iconContainerItem: iconContainer | ||||
261 | | ||||
257 | jobState: notificationItem.jobState | 262 | jobState: notificationItem.jobState | ||
258 | jobError: notificationItem.jobError | 263 | jobError: notificationItem.jobError | ||
259 | percentage: notificationItem.percentage | 264 | percentage: notificationItem.percentage | ||
260 | suspendable: notificationItem.suspendable | 265 | suspendable: notificationItem.suspendable | ||
261 | killable: notificationItem.killable | 266 | killable: notificationItem.killable | ||
262 | 267 | | |||
263 | jobDetails: notificationItem.jobDetails | 268 | jobDetails: notificationItem.jobDetails | ||
264 | showDetails: notificationItem.showDetails | 269 | showDetails: notificationItem.showDetails | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |