Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationPopup.qml
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 68 | Behavior on y { | |||
---|---|---|---|---|---|
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | mainItem: KQuickControlsAddons.MouseEventListener { | 75 | mainItem: KQuickControlsAddons.MouseEventListener { | ||
76 | id: root | 76 | id: root | ||
77 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 77 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
78 | LayoutMirroring.childrenInherit: true | 78 | LayoutMirroring.childrenInherit: true | ||
79 | 79 | | |||
80 | width: notificationItem.width + 2 * notificationItem.x | 80 | width: notificationItem.width | ||
81 | height: notificationItem.implicitHeight + 2 * notificationItem.y | 81 | height: notificationItem.implicitHeight | ||
82 | 82 | | |||
83 | hoverEnabled: true | 83 | hoverEnabled: true | ||
84 | 84 | | |||
85 | onClicked: { | 85 | onClicked: { | ||
86 | // the MEL would close the notification before the action button | 86 | // the MEL would close the notification before the action button | ||
87 | // onClicked handler would fire effectively breaking notification actions | 87 | // onClicked handler would fire effectively breaking notification actions | ||
88 | if (notificationItem.pressedAction()) { | 88 | if (notificationItem.pressedAction()) { | ||
89 | return | 89 | return | ||
Show All 26 Lines | 113 | NotificationItem { | |||
116 | summary: notificationProperties.summary || "" | 116 | summary: notificationProperties.summary || "" | ||
117 | body: notificationProperties.body || "" | 117 | body: notificationProperties.body || "" | ||
118 | icon: notificationProperties.appIcon || "" | 118 | icon: notificationProperties.appIcon || "" | ||
119 | image: notificationProperties.image | 119 | image: notificationProperties.image | ||
120 | // explicit true/false or else it complains about assigning undefined to bool | 120 | // explicit true/false or else it complains about assigning undefined to bool | ||
121 | configurable: notificationProperties.configurable && !Settings.isMobile ? true : false | 121 | configurable: notificationProperties.configurable && !Settings.isMobile ? true : false | ||
122 | urls: notificationProperties.urls || [] | 122 | urls: notificationProperties.urls || [] | ||
123 | 123 | | |||
124 | x: units.smallSpacing | | |||
125 | y: units.smallSpacing | | |||
126 | | ||||
127 | width: Math.round(23 * units.gridUnit) | 124 | width: Math.round(23 * units.gridUnit) | ||
128 | maximumTextHeight: theme.mSize(theme.defaultFont).height * 10 | 125 | maximumTextHeight: theme.mSize(theme.defaultFont).height * 10 | ||
129 | 126 | | |||
130 | onClose: { | 127 | onClose: { | ||
131 | closeNotification(notificationProperties.source) | 128 | closeNotification(notificationProperties.source) | ||
132 | notificationPopup.hide() | 129 | notificationPopup.hide() | ||
133 | } | 130 | } | ||
134 | onConfigure: { | 131 | onConfigure: { | ||
Show All 18 Lines |