Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/contents/ui/DisclaimerCardDelegate.qml
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 101 | Text { | |||
---|---|---|---|---|---|
108 | text: i18n("Mycroft by default is powered by a cloud-based speech to text service. Mycroft gives you the ability to change speech to text services or use a locally configured one within their settings at home.mycroft.ai.") | 108 | text: i18n("Mycroft by default is powered by a cloud-based speech to text service. Mycroft gives you the ability to change speech to text services or use a locally configured one within their settings at home.mycroft.ai.") | ||
109 | } | 109 | } | ||
110 | } | 110 | } | ||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | Drawer { | 113 | Drawer { | ||
114 | id: mcmenuItem | 114 | id: mcmenuItem | ||
115 | width: parent.width | 115 | width: parent.width | ||
116 | height: units.gridUnit * 5 | 116 | height: removeCardRectbtn.height + disableCardRectbtn.height | ||
117 | edge: Qt.TopEdge | 117 | edge: Qt.TopEdge | ||
118 | dragMargin: 0 | 118 | dragMargin: 0 | ||
119 | 119 | | |||
120 | Rectangle { | 120 | Rectangle { | ||
121 | id: menuRectItem | ||||
122 | anchors.fill: parent | ||||
123 | color: theme.backgroundColor | ||||
124 | | ||||
125 | Column { | ||||
126 | id: menuRectColumn | ||||
121 | anchors.fill: parent | 127 | anchors.fill: parent | ||
122 | color: theme.textColor | | |||
123 | 128 | | |||
124 | Rectangle { | 129 | Rectangle { | ||
125 | id: readaloudRectbtn | 130 | id: removeCardRectbtn | ||
126 | width: parent.width | 131 | width: parent.width | ||
127 | height: units.gridUnit * 2 | 132 | height: units.gridUnit * 2 | ||
128 | color: theme.textColor | 133 | color: theme.backgroundColor | ||
129 | anchors.top: parent.top | 134 | | ||
130 | anchors.topMargin: units.gridUnit * 0.25 | | |||
131 | Row { | 135 | Row { | ||
132 | spacing: 5 | 136 | spacing: 5 | ||
133 | Image { | 137 | PlasmaCore.IconItem { | ||
134 | id: readAloudIcon | 138 | id: removeCardIcon | ||
135 | anchors.verticalCenter: parent.verticalCenter | 139 | anchors.verticalCenter: parent.verticalCenter | ||
136 | source: "../images/readaloud.png" | 140 | source: "archive-remove" | ||
137 | width: 32 | 141 | width: units.gridUnit * 2 | ||
138 | height: 32 | 142 | height: units.gridUnit * 2 | ||
139 | } | 143 | } | ||
140 | Rectangle { | 144 | Rectangle { | ||
141 | id: readAloudSeperater | 145 | id: removeCardSeperater | ||
142 | width: 1 | 146 | width: 1 | ||
143 | height: parent.height | 147 | height: parent.height | ||
144 | color: theme.linkColor | 148 | color: theme.linkColor | ||
145 | } | 149 | } | ||
146 | Label { | 150 | PlasmaComponents.Label { | ||
147 | id: readAloudLabel | 151 | id: removeCardLabel | ||
148 | anchors.verticalCenter: parent.verticalCenter | 152 | anchors.verticalCenter: parent.verticalCenter | ||
149 | text: "Listen To/Play The Selected Article" | 153 | text: "Remove Card" | ||
150 | color: theme.backgroundColor | 154 | } | ||
155 | } | ||||
156 | MouseArea { | ||||
157 | anchors.fill: parent | ||||
158 | hoverEnabled: true | ||||
159 | onEntered: { | ||||
160 | removeCardLabel.color = theme.linkColor | ||||
161 | } | ||||
162 | onExited:{ | ||||
163 | removeCardLabel.color = theme.textColor | ||||
164 | } | ||||
165 | onClicked:{ | ||||
166 | disclaimerListModel.remove(index) | ||||
167 | removeChildCard() | ||||
151 | } | 168 | } | ||
152 | } | 169 | } | ||
153 | } | 170 | } | ||
154 | 171 | | |||
155 | Rectangle { | 172 | Rectangle { | ||
156 | id: btnshorzSepr | 173 | id: btnshorzSepr | ||
157 | width: parent.width | 174 | width: parent.width | ||
158 | height: 1 | 175 | height: 1 | ||
159 | color: theme.linkColor | 176 | color: theme.linkColor | ||
160 | anchors.top: readaloudRectbtn.bottom | | |||
161 | anchors.topMargin: units.gridUnit * 0.25 | | |||
162 | } | 177 | } | ||
163 | 178 | | |||
164 | Rectangle{ | 179 | Rectangle { | ||
165 | id: shareNwsBtn | 180 | id: disableCardRectbtn | ||
166 | width: parent.width | 181 | width: parent.width | ||
167 | height: units.gridUnit * 2 | 182 | height: units.gridUnit * 2 | ||
168 | color: theme.textColor | 183 | color: theme.backgroundColor | ||
169 | anchors.top: btnshorzSepr.bottom | 184 | | ||
170 | anchors.topMargin: units.gridUnit * 0.25 | | |||
171 | Row { | 185 | Row { | ||
172 | spacing: 5 | 186 | spacing: 5 | ||
173 | Image { | 187 | PlasmaCore.IconItem { | ||
174 | id: shareNewsIcon | 188 | id: disableCardIcon | ||
175 | anchors.verticalCenter: parent.verticalCenter | 189 | anchors.verticalCenter: parent.verticalCenter | ||
176 | source: "../images/share.png" | 190 | source: "document-close" | ||
177 | width: 32 | 191 | width: units.gridUnit * 2 | ||
178 | height: 32 | 192 | height: units.gridUnit * 2 | ||
179 | } | 193 | } | ||
180 | Rectangle { | 194 | Rectangle { | ||
181 | id: shareNewsSeperater | 195 | id: disableCardSeperater | ||
182 | width: 1 | 196 | width: 1 | ||
183 | height: parent.height | 197 | height: parent.height | ||
184 | color: theme.linkColor | 198 | color: theme.linkColor | ||
185 | } | 199 | } | ||
186 | Label { | 200 | PlasmaComponents.Label { | ||
187 | id: shareNewsLabel | 201 | id: disableCardLabel | ||
188 | anchors.verticalCenter: parent.verticalCenter | 202 | anchors.verticalCenter: parent.verticalCenter | ||
189 | text: "Share" | 203 | text: "Disable Disclaimer Card" | ||
190 | color: theme.backgroundColor | 204 | } | ||
205 | } | ||||
206 | MouseArea { | ||||
207 | anchors.fill: parent | ||||
208 | hoverEnabled: true | ||||
209 | onEntered: { | ||||
210 | disableCardLabel.color = theme.linkColor | ||||
211 | } | ||||
212 | onExited:{ | ||||
213 | disableCardLabel.color = theme.textColor | ||||
214 | } | ||||
215 | onClicked:{ | ||||
216 | disclaimercardswitch.checked = false | ||||
217 | disclaimerListModel.remove(index) | ||||
218 | removeChildCard() | ||||
219 | } | ||||
220 | } | ||||
221 | } | ||||
222 | | ||||
223 | Rectangle { | ||||
224 | id: btnshorzSeprEnd | ||||
225 | width: parent.width | ||||
226 | height: units.gridUnit * 0.75 | ||||
227 | color: theme.linkColor | ||||
228 | | ||||
229 | PlasmaCore.IconItem { | ||||
230 | id: closemenuDrawer | ||||
231 | anchors.centerIn: parent | ||||
232 | source: "go-up" | ||||
233 | width: units.gridUnit * 2 | ||||
234 | height: units.gridUnit * 2 | ||||
191 | } | 235 | } | ||
192 | } | 236 | } | ||
193 | } | 237 | } | ||
194 | } | 238 | } | ||
195 | } | 239 | } | ||
196 | } | 240 | } |