Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationPopup.qml
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 93 | if (!notificationProperties.isPersistent) { | |||
---|---|---|---|---|---|
94 | expireNotification(notificationProperties.source) | 94 | expireNotification(notificationProperties.source) | ||
95 | } | 95 | } | ||
96 | notificationPopup.notificationTimeout(); | 96 | notificationPopup.notificationTimeout(); | ||
97 | } | 97 | } | ||
98 | } | 98 | } | ||
99 | 99 | | |||
100 | NotificationItem { | 100 | NotificationItem { | ||
101 | id: notificationItem | 101 | id: notificationItem | ||
102 | property string text | | |||
103 | 102 | | |||
104 | summary: notificationProperties ? notificationProperties.summary: "" | 103 | summary: notificationProperties ? notificationProperties.summary: "" | ||
105 | text: notificationProperties ? notificationProperties.body : "" | 104 | body: notificationProperties ? notificationProperties.body : "" | ||
106 | icon: notificationProperties ? notificationProperties.appIcon : "" | 105 | icon: notificationProperties ? notificationProperties.appIcon : "" | ||
107 | image: notificationProperties ? notificationProperties.image : undefined | 106 | image: notificationProperties ? notificationProperties.image : undefined | ||
108 | configurable: (notificationProperties ? notificationProperties.configurable : false) && !Settings.isMobile | 107 | configurable: (notificationProperties ? notificationProperties.configurable : false) && !Settings.isMobile | ||
109 | 108 | | |||
110 | x: units.smallSpacing | 109 | x: units.smallSpacing | ||
111 | y: units.smallSpacing | 110 | y: units.smallSpacing | ||
112 | 111 | | |||
113 | width: Math.round(23 * units.gridUnit) | 112 | width: Math.round(23 * units.gridUnit) | ||
114 | 113 | | |||
115 | textItem: PlasmaComponents.Label { | | |||
116 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere | | |||
117 | elide: Text.ElideRight | | |||
118 | verticalAlignment: Text.AlignTop | | |||
119 | onLinkActivated: Qt.openUrlExternally(link) | | |||
120 | text: notificationItem.text | | |||
121 | textFormat: Text.StyledText | | |||
122 | maximumLineCount: 4 | | |||
123 | } | | |||
124 | | ||||
125 | onClose: { | 114 | onClose: { | ||
126 | closeNotification(notificationProperties.source) | 115 | closeNotification(notificationProperties.source) | ||
127 | notificationPopup.hide() | 116 | notificationPopup.hide() | ||
128 | } | 117 | } | ||
129 | onConfigure: { | 118 | onConfigure: { | ||
130 | configureNotification(notificationProperties.appRealName, notificationProperties.eventId) | 119 | configureNotification(notificationProperties.appRealName, notificationProperties.eventId) | ||
131 | notificationPopup.hide() | 120 | notificationPopup.hide() | ||
132 | } | 121 | } | ||
Show All 9 Lines |