diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-09 17:50:57 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-09 17:50:57 +0100 |
commit | 229492f0550730a62d74935e45087683cb5f88e9 (patch) | |
tree | ee5864920c448bdc73f03ce72114dd509e7961f9 | |
parent | 3eff42fdbf6406b6fb230be86aca759427e4681e (diff) | |
download | kube-229492f0550730a62d74935e45087683cb5f88e9.tar.gz kube-229492f0550730a62d74935e45087683cb5f88e9.zip |
add detailed header view
-rw-r--r-- | components/package/contents/ui/SingleMailView.qml | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/components/package/contents/ui/SingleMailView.qml b/components/package/contents/ui/SingleMailView.qml index ca6d52f1..d7c3193c 100644 --- a/components/package/contents/ui/SingleMailView.qml +++ b/components/package/contents/ui/SingleMailView.qml | |||
@@ -97,6 +97,27 @@ Item { | |||
97 | 97 | ||
98 | height: headerContent.height + Kirigami.Units.smallSpacing | 98 | height: headerContent.height + Kirigami.Units.smallSpacing |
99 | 99 | ||
100 | states: [ | ||
101 | State { | ||
102 | name: "small" | ||
103 | PropertyChanges { target: subject; wrapMode: Text.NoWrap} | ||
104 | PropertyChanges { target: recipients; visible: true} | ||
105 | PropertyChanges { target: to; visible: false} | ||
106 | PropertyChanges { target: cc; visible: false} | ||
107 | PropertyChanges { target: bcc; visible: false} | ||
108 | }, | ||
109 | State { | ||
110 | name: "details" | ||
111 | PropertyChanges { target: subject; wrapMode: Text.WrapAnywhere} | ||
112 | PropertyChanges { target: recipients; visible: false} | ||
113 | PropertyChanges { target: to; visible: true} | ||
114 | PropertyChanges { target: cc; visible: true} | ||
115 | PropertyChanges { target: bcc; visible: true} | ||
116 | } | ||
117 | ] | ||
118 | |||
119 | state: "small" | ||
120 | |||
100 | Text { | 121 | Text { |
101 | id: date_label | 122 | id: date_label |
102 | 123 | ||
@@ -157,6 +178,7 @@ Item { | |||
157 | } | 178 | } |
158 | 179 | ||
159 | Text { | 180 | Text { |
181 | id: subject | ||
160 | 182 | ||
161 | width: to.width | 183 | width: to.width |
162 | 184 | ||
@@ -170,7 +192,7 @@ Item { | |||
170 | } | 192 | } |
171 | 193 | ||
172 | Text { | 194 | Text { |
173 | id: to | 195 | id: recipients |
174 | 196 | ||
175 | width: parent.width - goDown.width - Kirigami.Units.smallSpacing | 197 | width: parent.width - goDown.width - Kirigami.Units.smallSpacing |
176 | 198 | ||
@@ -182,6 +204,42 @@ Item { | |||
182 | opacity: 0.75 | 204 | opacity: 0.75 |
183 | } | 205 | } |
184 | 206 | ||
207 | Text { | ||
208 | id: to | ||
209 | |||
210 | width: parent.width - goDown.width - Kirigami.Units.smallSpacing | ||
211 | |||
212 | text:"to: " + model.to | ||
213 | |||
214 | wrapMode: Text.WordWrap | ||
215 | color: Kirigami.Theme.textColor | ||
216 | opacity: 0.75 | ||
217 | } | ||
218 | |||
219 | Text { | ||
220 | id: cc | ||
221 | |||
222 | width: parent.width - goDown.width - Kirigami.Units.smallSpacing | ||
223 | |||
224 | text:"cc: " + model.cc | ||
225 | |||
226 | wrapMode: Text.WordWrap | ||
227 | color: Kirigami.Theme.textColor | ||
228 | opacity: 0.75 | ||
229 | } | ||
230 | |||
231 | Text { | ||
232 | id: bcc | ||
233 | |||
234 | width: parent.width - goDown.width - Kirigami.Units.smallSpacing | ||
235 | |||
236 | text:"bcc: " + model.bcc | ||
237 | |||
238 | wrapMode: Text.WordWrap | ||
239 | color: Kirigami.Theme.textColor | ||
240 | opacity: 0.75 | ||
241 | } | ||
242 | |||
185 | } | 243 | } |
186 | Rectangle { | 244 | Rectangle { |
187 | id: goDown | 245 | id: goDown |
@@ -216,7 +274,11 @@ Item { | |||
216 | Controls1.ToolButton { | 274 | Controls1.ToolButton { |
217 | anchors.fill: parent | 275 | anchors.fill: parent |
218 | 276 | ||
219 | iconName: "go-down" | 277 | iconName: header.state === "details" ? "go-up" : "go-down" |
278 | |||
279 | onClicked: { | ||
280 | header.state === "details" ? header.state = "small" : header.state = "details" | ||
281 | } | ||
220 | } | 282 | } |
221 | } | 283 | } |
222 | 284 | ||