Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationPopup.qml
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Line(s) | 162 | NumberAnimation { | |||
---|---|---|---|---|---|
167 | to: 0 | 167 | to: 0 | ||
168 | duration: Math.min(timer.interval, timeoutIndicatorDelayTimer.remainingTimeout) | 168 | duration: Math.min(timer.interval, timeoutIndicatorDelayTimer.remainingTimeout) | ||
169 | running: timer.running && !timeoutIndicatorDelayTimer.running && units.longDuration > 1 | 169 | running: timer.running && !timeoutIndicatorDelayTimer.running && units.longDuration > 1 | ||
170 | } | 170 | } | ||
171 | } | 171 | } | ||
172 | 172 | | |||
173 | NotificationItem { | 173 | NotificationItem { | ||
174 | id: notificationItem | 174 | id: notificationItem | ||
175 | // let the item bleed into the dialog margins so the close button margins cancel out | 175 | // Make top padding match for notifications with no top-right button | ||
176 | y: closable || dismissable || configurable ? -notificationPopup.margins.top : 0 | 176 | y: closable || dismissable || configurable ? 0 : notificationPopup.margins.top | ||
177 | headingRightPadding: -notificationPopup.margins.right | | |||
178 | width: parent.width | 177 | width: parent.width | ||
179 | hovered: area.containsMouse | 178 | hovered: area.containsMouse | ||
180 | maximumLineCount: 8 | 179 | maximumLineCount: 8 | ||
181 | bodyCursorShape: notificationPopup.hasDefaultAction ? Qt.PointingHandCursor : 0 | 180 | bodyCursorShape: notificationPopup.hasDefaultAction ? Qt.PointingHandCursor : 0 | ||
182 | 181 | | |||
183 | thumbnailLeftPadding: -notificationPopup.margins.left | 182 | thumbnailLeftPadding: -notificationPopup.margins.left | ||
184 | thumbnailRightPadding: -notificationPopup.margins.right | 183 | thumbnailRightPadding: -notificationPopup.margins.right | ||
185 | thumbnailTopPadding: -notificationPopup.margins.top | | |||
186 | thumbnailBottomPadding: -notificationPopup.margins.bottom | 184 | thumbnailBottomPadding: -notificationPopup.margins.bottom | ||
187 | 185 | | |||
188 | closable: true | 186 | closable: true | ||
189 | onBodyClicked: { | 187 | onBodyClicked: { | ||
190 | if (area.acceptedButtons & mouse.button) { | 188 | if (area.acceptedButtons & mouse.button) { | ||
191 | area.clicked(null /*mouse*/); | 189 | area.clicked(null /*mouse*/); | ||
192 | } | 190 | } | ||
193 | } | 191 | } | ||
Show All 13 Lines |