diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-06-15 18:32:54 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-06-15 18:32:54 +0200 |
commit | 6d2b4f84b0efdb6b1d6c207ed2ab6fc06c140ab8 (patch) | |
tree | 28b80bef620072774d17b02b02d1e6c03feae098 /components/mail/contents | |
parent | 1949e99b01b223998d40a0bb5ff2ac4b9177bea4 (diff) | |
download | kube-6d2b4f84b0efdb6b1d6c207ed2ab6fc06c140ab8.tar.gz kube-6d2b4f84b0efdb6b1d6c207ed2ab6fc06c140ab8.zip |
add add account / sync / edit account buttons
Diffstat (limited to 'components/mail/contents')
-rw-r--r-- | components/mail/contents/ui/main.qml | 78 |
1 files changed, 52 insertions, 26 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 7b318991..4d60e71b 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -157,21 +157,65 @@ ApplicationWindow { | |||
157 | width: 600 | 157 | width: 600 |
158 | 158 | ||
159 | color: "lightgrey" //FIXME create a propper dialog thingy | 159 | color: "lightgrey" //FIXME create a propper dialog thingy |
160 | |||
161 | clip: true | 160 | clip: true |
162 | 161 | ||
162 | Item { | ||
163 | id: footer | ||
164 | |||
165 | anchors { | ||
166 | bottom: parent.bottom | ||
167 | left: parent.left | ||
168 | right: parent.right | ||
169 | margins: Kirigami.Units.largeSpacing | ||
170 | } | ||
171 | |||
172 | height: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 1 | ||
173 | width: listView.width | ||
174 | |||
175 | Button { | ||
176 | |||
177 | anchors { | ||
178 | verticalCenter: parent.verticalCenter | ||
179 | right: parent.right | ||
180 | } | ||
181 | |||
182 | text: "Create new Account" | ||
183 | } | ||
184 | |||
185 | Button { | ||
186 | |||
187 | anchors { | ||
188 | verticalCenter: parent.verticalCenter | ||
189 | left: parent.left | ||
190 | } | ||
191 | |||
192 | iconName: "view-refresh" | ||
193 | text: "Sync" | ||
194 | enabled: syncAction.ready | ||
195 | |||
196 | onClicked: { | ||
197 | syncAction.execute() | ||
198 | } | ||
199 | } | ||
200 | } | ||
201 | |||
163 | ListView { | 202 | ListView { |
164 | id: listView | 203 | id: listView |
165 | 204 | ||
166 | anchors.fill: parent | 205 | anchors { |
167 | 206 | top: parent.top | |
168 | footer: Button { | 207 | bottom: footer.top |
169 | text: "Create new Account" | 208 | left: parent.left |
209 | right: parent.right | ||
170 | } | 210 | } |
171 | 211 | ||
212 | clip: true | ||
213 | |||
172 | model: KubeFramework.AccountsModel { } | 214 | model: KubeFramework.AccountsModel { } |
173 | 215 | ||
174 | delegate: Kirigami.AbstractListItem { | 216 | delegate: Kirigami.AbstractListItem { |
217 | id: accountDelegate | ||
218 | |||
175 | enabled: true | 219 | enabled: true |
176 | supportsMouseEvents: true | 220 | supportsMouseEvents: true |
177 | 221 | ||
@@ -200,8 +244,6 @@ ApplicationWindow { | |||
200 | Label { | 244 | Label { |
201 | text: model.name === "" ? accountFactory.name : model.name | 245 | text: model.name === "" ? accountFactory.name : model.name |
202 | } | 246 | } |
203 | |||
204 | |||
205 | } | 247 | } |
206 | Button { | 248 | Button { |
207 | 249 | ||
@@ -210,34 +252,18 @@ ApplicationWindow { | |||
210 | margins: Kirigami.Units.largeSpacing | 252 | margins: Kirigami.Units.largeSpacing |
211 | } | 253 | } |
212 | 254 | ||
213 | 255 | visible: accountDelegate.containsMouse | |
214 | text: "edit" | 256 | text: "edit" |
215 | } | 257 | } |
216 | } | 258 | } |
217 | } | 259 | } |
218 | } | 260 | } |
219 | |||
220 | } | 261 | } |
221 | |||
222 | } | 262 | } |
223 | 263 | ||
224 | /* | 264 | /* |
225 | * KubeComponents.AccountSwitcher { | 265 | * |
226 | * Layout.fillHeight: true | 266 | */ |
227 | * Layout.fillWidth: true | ||
228 | } | ||
229 | |||
230 | |||
231 | ToolButton { | ||
232 | iconName: "view-refresh" | ||
233 | text: "Sync" | ||
234 | enabled: syncAction.ready | ||
235 | |||
236 | onClicked: { | ||
237 | syncAction.execute() | ||
238 | } | ||
239 | } | ||
240 | */ | ||
241 | } | 267 | } |
242 | //END Folderlist section | 268 | //END Folderlist section |
243 | 269 | ||