Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/CompactRepresentation.qml
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 27 | MouseArea { | |||
---|---|---|---|---|---|
59 | PlasmaCore.SvgItem { | 59 | PlasmaCore.SvgItem { | ||
60 | id: notificationIcon | 60 | id: notificationIcon | ||
61 | anchors.centerIn: parent | 61 | anchors.centerIn: parent | ||
62 | width: units.roundToIconSize(Math.min(parent.width, parent.height)) | 62 | width: units.roundToIconSize(Math.min(parent.width, parent.height)) | ||
63 | height: width | 63 | height: width | ||
64 | svg: notificationSvg | 64 | svg: notificationSvg | ||
65 | visible: opacity > 0 | 65 | visible: opacity > 0 | ||
66 | 66 | | |||
67 | elementId: "notification-inactive" | 67 | elementId: "notification-disabled" | ||
68 | 68 | | |||
69 | Item { | 69 | Item { | ||
70 | id: jobProgressItem | 70 | id: jobProgressItem | ||
71 | anchors { | 71 | anchors { | ||
72 | left: parent.left | 72 | left: parent.left | ||
73 | top: parent.top | 73 | top: parent.top | ||
74 | bottom: parent.bottom | 74 | bottom: parent.bottom | ||
75 | } | 75 | } | ||
Show All 23 Lines | 94 | PlasmaComponents.Label { | |||
99 | fontSizeMode: Text.Fit | 99 | fontSizeMode: Text.Fit | ||
100 | font.pointSize: 1024 | 100 | font.pointSize: 1024 | ||
101 | font.pixelSize: -1 | 101 | font.pixelSize: -1 | ||
102 | minimumPointSize: 5//theme.smallestFont.pointSize | 102 | minimumPointSize: 5//theme.smallestFont.pointSize | ||
103 | horizontalAlignment: Text.AlignHCenter | 103 | horizontalAlignment: Text.AlignHCenter | ||
104 | verticalAlignment: Text.AlignVCenter | 104 | verticalAlignment: Text.AlignVCenter | ||
105 | text: compactRoot.unreadCount || "" | 105 | text: compactRoot.unreadCount || "" | ||
106 | renderType: Text.QtRendering | 106 | renderType: Text.QtRendering | ||
107 | visible: false | ||||
107 | } | 108 | } | ||
108 | 109 | | |||
109 | PlasmaComponents.BusyIndicator { | 110 | PlasmaComponents.BusyIndicator { | ||
110 | id: busyIndicator | 111 | id: busyIndicator | ||
111 | anchors.fill: parent | 112 | anchors.fill: parent | ||
112 | visible: false | 113 | visible: false | ||
113 | running: visible | 114 | running: visible | ||
114 | } | 115 | } | ||
Show All 13 Lines | 128 | State { // active process | |||
128 | when: compactRoot.jobsCount > 0 | 129 | when: compactRoot.jobsCount > 0 | ||
129 | PropertyChanges { | 130 | PropertyChanges { | ||
130 | target: notificationIcon | 131 | target: notificationIcon | ||
131 | elementId: "notification-progress-inactive" | 132 | elementId: "notification-progress-inactive" | ||
132 | } | 133 | } | ||
133 | PropertyChanges { | 134 | PropertyChanges { | ||
134 | target: countLabel | 135 | target: countLabel | ||
135 | text: compactRoot.jobsCount | 136 | text: compactRoot.jobsCount | ||
137 | visible: true | ||||
136 | } | 138 | } | ||
137 | PropertyChanges { | 139 | PropertyChanges { | ||
138 | target: busyIndicator | 140 | target: busyIndicator | ||
139 | visible: true | 141 | visible: true | ||
140 | } | 142 | } | ||
141 | PropertyChanges { | 143 | PropertyChanges { | ||
142 | target: jobProgressItem | 144 | target: jobProgressItem | ||
143 | visible: true | 145 | visible: true | ||
Show All 11 Lines | 155 | PropertyChanges { | |||
155 | scale: 0 | 157 | scale: 0 | ||
156 | opacity: 0 | 158 | opacity: 0 | ||
157 | } | 159 | } | ||
158 | }, | 160 | }, | ||
159 | State { // unread notifications | 161 | State { // unread notifications | ||
160 | when: compactRoot.unreadCount > 0 | 162 | when: compactRoot.unreadCount > 0 | ||
161 | PropertyChanges { | 163 | PropertyChanges { | ||
162 | target: notificationIcon | 164 | target: notificationIcon | ||
163 | elementId: "notification-empty" | 165 | elementId: "notification-active" | ||
164 | } | | |||
165 | PropertyChanges { | | |||
166 | target: countLabel | | |||
167 | text: compactRoot.unreadCount | | |||
168 | } | 166 | } | ||
169 | } | 167 | } | ||
170 | ] | 168 | ] | ||
171 | 169 | | |||
172 | transitions: [ | 170 | transitions: [ | ||
173 | Transition { | 171 | Transition { | ||
174 | to: "*" // any state | 172 | to: "*" // any state | ||
175 | NumberAnimation { | 173 | NumberAnimation { | ||
Show All 9 Lines |