Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/CompactRepresentation.qml
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 59 | PlasmaCore.SvgItem { | |||
---|---|---|---|---|---|
102 | } | 102 | } | ||
103 | 103 | | |||
104 | PlasmaComponents.BusyIndicator { | 104 | PlasmaComponents.BusyIndicator { | ||
105 | id: busyIndicator | 105 | id: busyIndicator | ||
106 | anchors.fill: parent | 106 | anchors.fill: parent | ||
107 | visible: false | 107 | visible: false | ||
108 | running: visible | 108 | running: visible | ||
109 | } | 109 | } | ||
110 | | ||||
111 | PlasmaCore.SvgItem { | | |||
112 | id: notificationActiveItem | | |||
113 | anchors.fill: parent | | |||
114 | | ||||
115 | svg: notificationSvg | | |||
116 | elementId: "notification-active" | | |||
117 | opacity: 0 | | |||
118 | scale: 2 | | |||
119 | visible: opacity > 0 | | |||
120 | } | | |||
121 | } | 110 | } | ||
122 | 111 | | |||
123 | PlasmaCore.IconItem { | 112 | PlasmaCore.IconItem { | ||
124 | id: dndIcon | 113 | id: dndIcon | ||
125 | anchors.fill: parent | 114 | anchors.fill: parent | ||
126 | source: "notifications-disabled" | 115 | source: "notifications-disabled" | ||
127 | opacity: 0 | 116 | opacity: 0 | ||
128 | scale: 2 | 117 | scale: 2 | ||
Show All 15 Lines | 132 | PropertyChanges { | |||
144 | target: busyIndicator | 133 | target: busyIndicator | ||
145 | visible: true | 134 | visible: true | ||
146 | } | 135 | } | ||
147 | PropertyChanges { | 136 | PropertyChanges { | ||
148 | target: jobProgressItem | 137 | target: jobProgressItem | ||
149 | visible: true | 138 | visible: true | ||
150 | } | 139 | } | ||
151 | }, | 140 | }, | ||
152 | State { // active notification | | |||
153 | when: compactRoot.activeCount > 0 | | |||
154 | PropertyChanges { | | |||
155 | target: notificationActiveItem | | |||
156 | scale: 1 | | |||
157 | opacity: 1 | | |||
158 | } | | |||
159 | }, | | |||
160 | State { // do not disturb | 141 | State { // do not disturb | ||
161 | when: compactRoot.inhibited | 142 | when: compactRoot.inhibited | ||
162 | PropertyChanges { | 143 | PropertyChanges { | ||
163 | target: dndIcon | 144 | target: dndIcon | ||
164 | scale: 1 | 145 | scale: 1 | ||
165 | opacity: 1 | 146 | opacity: 1 | ||
166 | } | 147 | } | ||
167 | PropertyChanges { | 148 | PropertyChanges { | ||
Show All 14 Lines | 154 | State { // unread notifications | |||
182 | } | 163 | } | ||
183 | } | 164 | } | ||
184 | ] | 165 | ] | ||
185 | 166 | | |||
186 | transitions: [ | 167 | transitions: [ | ||
187 | Transition { | 168 | Transition { | ||
188 | to: "*" // any state | 169 | to: "*" // any state | ||
189 | NumberAnimation { | 170 | NumberAnimation { | ||
190 | targets: [notificationIcon, notificationActiveItem, dndIcon] | 171 | targets: [notificationIcon, dndIcon] | ||
191 | properties: "opacity,scale" | 172 | properties: "opacity,scale" | ||
192 | duration: units.longDuration | 173 | duration: units.longDuration | ||
193 | easing.type: Easing.InOutQuad | 174 | easing.type: Easing.InOutQuad | ||
194 | } | 175 | } | ||
195 | } | 176 | } | ||
196 | ] | 177 | ] | ||
197 | 178 | | |||
198 | } | 179 | } |