diff options
author | tg(x) <*@tg-x.net> | 2016-03-18 20:54:40 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-03-18 20:54:40 +0100 |
commit | ef51a76cd4a4ec8aaa8f4622d23b80d2b7f61a71 (patch) | |
tree | 9029f78d40678200e5ba99578b40e32d11195602 | |
parent | fdd50e49e8e7598984700872bd7720f9daec7f58 (diff) | |
download | secushare-ef51a76cd4a4ec8aaa8f4622d23b80d2b7f61a71.tar.gz secushare-ef51a76cd4a4ec8aaa8f4622d23b80d2b7f61a71.zip |
qml: reply under msg in thread
-rw-r--r-- | qml.qrc | 4 | ||||
-rw-r--r-- | qml/EgoCreate.qml | 2 | ||||
-rw-r--r-- | qml/PlaceCreate.qml | 2 | ||||
-rw-r--r-- | qml/PlaceEnter.qml | 6 | ||||
-rw-r--r-- | qml/PlaceThread.qml | 155 | ||||
-rw-r--r-- | qml/images/settings-black.png (renamed from qml/images/settings_dark.png) | bin | 527 -> 527 bytes | |||
-rw-r--r-- | qml/images/settings-white.png | bin | 0 -> 719 bytes | |||
-rw-r--r-- | qml/images/settings.png | bin | 557 -> 0 bytes |
8 files changed, 92 insertions, 77 deletions
@@ -42,8 +42,8 @@ | |||
42 | <file>qml/images/person.png</file> | 42 | <file>qml/images/person.png</file> |
43 | <file>qml/images/phone.png</file> | 43 | <file>qml/images/phone.png</file> |
44 | <file>qml/images/send.png</file> | 44 | <file>qml/images/send.png</file> |
45 | <file>qml/images/settings_dark.png</file> | 45 | <file>qml/images/settings-black.png</file> |
46 | <file>qml/images/settings.png</file> | 46 | <file>qml/images/settings-white.png</file> |
47 | <file>qml/images/share.png</file> | 47 | <file>qml/images/share.png</file> |
48 | <file>qml/images/thread_dark.png</file> | 48 | <file>qml/images/thread_dark.png</file> |
49 | <file>qml/images/thread.png</file> | 49 | <file>qml/images/thread.png</file> |
diff --git a/qml/EgoCreate.qml b/qml/EgoCreate.qml index 5b769e2..ae58c08 100644 --- a/qml/EgoCreate.qml +++ b/qml/EgoCreate.qml | |||
@@ -68,7 +68,7 @@ Rectangle { | |||
68 | Button { | 68 | Button { |
69 | text: "Create" | 69 | text: "Create" |
70 | onClicked: { | 70 | onClicked: { |
71 | // FIXME: App.gnunet.identity.createEgo(newName.text) | 71 | // FIXME: App.createEgo(newName.text) |
72 | } | 72 | } |
73 | } | 73 | } |
74 | } | 74 | } |
diff --git a/qml/PlaceCreate.qml b/qml/PlaceCreate.qml index a5a4313..ce67caa 100644 --- a/qml/PlaceCreate.qml +++ b/qml/PlaceCreate.qml | |||
@@ -173,7 +173,7 @@ Rectangle { | |||
173 | width: 200 | 173 | width: 200 |
174 | 174 | ||
175 | onClicked: { | 175 | onClicked: { |
176 | App.social.createPlace("FIXME: egoPubKey") // FIXME: nameField.text | 176 | App.createPlace("FIXME: egoPubKey") // FIXME: nameField.text |
177 | } | 177 | } |
178 | } | 178 | } |
179 | } | 179 | } |
diff --git a/qml/PlaceEnter.qml b/qml/PlaceEnter.qml index 3dcd3e7..6a0e8ac 100644 --- a/qml/PlaceEnter.qml +++ b/qml/PlaceEnter.qml | |||
@@ -16,7 +16,7 @@ Rectangle { | |||
16 | FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" } | 16 | FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" } |
17 | 17 | ||
18 | Rectangle { | 18 | Rectangle { |
19 | id:headerBanner | 19 | id: headerBanner |
20 | anchors.top: parent.top | 20 | anchors.top: parent.top |
21 | anchors.left: parent.left | 21 | anchors.left: parent.left |
22 | anchors.right: parent.right | 22 | anchors.right: parent.right |
@@ -126,7 +126,7 @@ Rectangle { | |||
126 | } | 126 | } |
127 | 127 | ||
128 | ColumnLayout { | 128 | ColumnLayout { |
129 | id:dataRow | 129 | id: dataRow |
130 | anchors.top: typeRow.bottom | 130 | anchors.top: typeRow.bottom |
131 | anchors.left: typeRow.left | 131 | anchors.left: typeRow.left |
132 | anchors.right: typeRow.right | 132 | anchors.right: typeRow.right |
@@ -212,7 +212,7 @@ Rectangle { | |||
212 | width: 200 | 212 | width: 200 |
213 | 213 | ||
214 | onClicked: { | 214 | onClicked: { |
215 | App.social.enterPlace("FIXME: egoPubKey", publicKeyField.text, originField.text) | 215 | App.enterPlace("FIXME: egoPubKey", publicKeyField.text, originField.text) |
216 | } | 216 | } |
217 | } | 217 | } |
218 | } | 218 | } |
diff --git a/qml/PlaceThread.qml b/qml/PlaceThread.qml index 6ac4fe8..2ec63fd 100644 --- a/qml/PlaceThread.qml +++ b/qml/PlaceThread.qml | |||
@@ -1,6 +1,6 @@ | |||
1 | import QtQuick 2.2 | 1 | import QtQuick 2.2 |
2 | import QtQuick.Window 2.1; | 2 | import QtQuick.Window 2.1 |
3 | import QtQuick.Controls 1.1 | 3 | import QtQuick.Controls 1.4 |
4 | import QtQuick.Layouts 1.1 | 4 | import QtQuick.Layouts 1.1 |
5 | 5 | ||
6 | import secushare 1.0 | 6 | import secushare 1.0 |
@@ -90,7 +90,7 @@ Rectangle { | |||
90 | id: messageList | 90 | id: messageList |
91 | anchors.top: forumTitleRectangle.bottom | 91 | anchors.top: forumTitleRectangle.bottom |
92 | anchors.topMargin: 30 | 92 | anchors.topMargin: 30 |
93 | anchors.bottom: replyField.top | 93 | anchors.bottom: parent.bottom |
94 | anchors.right: parent.right | 94 | anchors.right: parent.right |
95 | 95 | ||
96 | anchors.left: parent.left | 96 | anchors.left: parent.left |
@@ -107,14 +107,14 @@ Rectangle { | |||
107 | Item { | 107 | Item { |
108 | id: messageItem | 108 | id: messageItem |
109 | width: parent.width - 100 | 109 | width: parent.width - 100 |
110 | height: (contentWrapper.height > userWrapper.height) ? contentWrapper.height : userWrapper.height | 110 | height: ((contentWrapper.height > userWrapper.height) ? contentWrapper.height : userWrapper.height) + ((replyField.visible) ? replyField.height + 10 : 0); |
111 | 111 | ||
112 | Rectangle { | 112 | Rectangle { |
113 | id: userWrapper | 113 | id: userWrapper |
114 | width: (index == 0) ? 140 : 90 | 114 | width: (index == 0) ? 140 : 90 |
115 | height: (index == 0) ? 140 : 90 | 115 | height: (index == 0) ? 140 : 90 |
116 | anchors.left: parent.left | 116 | anchors.left: parent.left |
117 | anchors.leftMargin: (index == 0) ? 0 : 50 | 117 | anchors.leftMargin: index * 50 |
118 | 118 | ||
119 | color: "black" | 119 | color: "black" |
120 | opacity: 1.0 | 120 | opacity: 1.0 |
@@ -183,6 +183,22 @@ Rectangle { | |||
183 | } | 183 | } |
184 | 184 | ||
185 | Text { | 185 | Text { |
186 | id: contentReply | ||
187 | |||
188 | anchors.bottom: parent.bottom | ||
189 | anchors.margins: 10 | ||
190 | |||
191 | text: "Reply" | ||
192 | font.pointSize: 11 | ||
193 | font.family: ubuntuFont.name | ||
194 | |||
195 | MouseArea { | ||
196 | anchors.fill: parent | ||
197 | onClicked: replyField.visible = !replyField.visible; | ||
198 | } | ||
199 | } | ||
200 | |||
201 | Text { | ||
186 | id: contentDate | 202 | id: contentDate |
187 | 203 | ||
188 | width: parent.width - 10 | 204 | width: parent.width - 10 |
@@ -194,80 +210,79 @@ Rectangle { | |||
194 | horizontalAlignment: Text.AlignRight | 210 | horizontalAlignment: Text.AlignRight |
195 | font.family: ubuntuFont.name | 211 | font.family: ubuntuFont.name |
196 | } | 212 | } |
197 | |||
198 | } | 213 | } |
199 | } | ||
200 | } | ||
201 | } | ||
202 | 214 | ||
203 | Item { | 215 | Item { |
204 | id: replyField | 216 | id: replyField |
205 | height: 70 | 217 | visible: false |
206 | anchors.left: parent.left | 218 | height: 70 |
207 | anchors.right: parent.right | 219 | anchors.left: parent.left |
208 | anchors.bottom: parent.bottom | 220 | anchors.leftMargin: (index + 1) * 50 |
221 | anchors.right: parent.right | ||
222 | anchors.bottom: parent.bottom | ||
209 | 223 | ||
210 | Rectangle { | 224 | Rectangle { |
211 | id: userWrapper | 225 | id: replyUserWrapper |
212 | width: 60 | 226 | width: 60 |
213 | height: 60 | 227 | height: 60 |
214 | color: "black" | 228 | color: "black" |
215 | opacity: 1.0 | 229 | opacity: 1.0 |
216 | 230 | ||
217 | anchors.left: parent.left | 231 | anchors.left: parent.left |
218 | anchors.leftMargin: 5 | 232 | anchors.leftMargin: 5 |
219 | anchors.top: parent.top | 233 | anchors.top: parent.top |
220 | |||
221 | Image { | ||
222 | id: messageMiniImage | ||
223 | source: "images/demo/lynX.jpg" | ||
224 | fillMode: Image.PreserveAspectCrop | ||
225 | height: 40 | ||
226 | width: 48 | ||
227 | anchors.left: parent.left | ||
228 | anchors.top: parent.top | ||
229 | anchors.margins: 3 | ||
230 | } | ||
231 | 234 | ||
232 | Text { | 235 | Image { |
233 | anchors.top: messageMiniImage.bottom | 236 | id: replyMessageMiniImage |
234 | id: contactText | 237 | source: "images/demo/lynX.jpg" |
235 | text: "lynX" | 238 | fillMode: Image.PreserveAspectCrop |
236 | font.pointSize: 10 | 239 | height: 40 |
237 | width: 55 | 240 | width: 48 |
238 | height: 15 | 241 | anchors.left: parent.left |
239 | anchors.left: parent.left | 242 | anchors.top: parent.top |
240 | anchors.leftMargin: 5 | 243 | anchors.margins: 3 |
241 | 244 | } | |
242 | wrapMode : Text.Wrap | ||
243 | elide : Text.ElideRight | ||
244 | color: "white" | ||
245 | |||
246 | font.family: ubuntuBIFont.name | ||
247 | font.letterSpacing : -1 | ||
248 | } | ||
249 | } | ||
250 | 245 | ||
251 | TextArea { | 246 | Text { |
252 | anchors.left: userWrapper.right | 247 | anchors.top: replyMessageMiniImage.bottom |
253 | anchors.right: parent.right | 248 | text: "lynX" |
254 | anchors.top: userWrapper.top | 249 | font.pointSize: 10 |
255 | anchors.bottom: userWrapper.bottom | 250 | width: 55 |
256 | anchors.rightMargin: 10 | 251 | height: 15 |
257 | anchors.leftMargin: 10 | 252 | anchors.left: parent.left |
258 | 253 | anchors.leftMargin: 5 | |
259 | Keys.onReturnPressed: { | 254 | |
260 | if (Qt.ControlModifier & event.modifiers) | 255 | wrapMode : Text.Wrap |
261 | { | 256 | elide : Text.ElideRight |
262 | thread.talk(text) | 257 | color: "white" |
263 | cursorPosition = 0 | 258 | |
264 | text = "" | 259 | font.family: ubuntuBIFont.name |
265 | event.accepted = true | 260 | font.letterSpacing : -1 |
261 | } | ||
262 | } | ||
263 | |||
264 | TextArea { | ||
265 | anchors.left: replyUserWrapper.right | ||
266 | anchors.right: parent.right | ||
267 | anchors.top: replyUserWrapper.top | ||
268 | anchors.bottom: replyUserWrapper.bottom | ||
269 | anchors.rightMargin: 10 | ||
270 | anchors.leftMargin: 10 | ||
271 | |||
272 | Keys.onReturnPressed: { | ||
273 | if (Qt.ControlModifier & event.modifiers) | ||
274 | { | ||
275 | thread.talk(text) | ||
276 | cursorPosition = 0 | ||
277 | text = "" | ||
278 | event.accepted = true | ||
279 | } | ||
280 | else event.accepted = false | ||
281 | } | ||
282 | } | ||
266 | } | 283 | } |
267 | else event.accepted = false | ||
268 | } | 284 | } |
269 | } | 285 | } |
270 | |||
271 | } | 286 | } |
272 | } | 287 | } |
273 | } | 288 | } |
diff --git a/qml/images/settings_dark.png b/qml/images/settings-black.png index f65ccda..f65ccda 100644 --- a/qml/images/settings_dark.png +++ b/qml/images/settings-black.png | |||
Binary files differ | |||
diff --git a/qml/images/settings-white.png b/qml/images/settings-white.png new file mode 100644 index 0000000..0b0a62b --- /dev/null +++ b/qml/images/settings-white.png | |||
Binary files differ | |||
diff --git a/qml/images/settings.png b/qml/images/settings.png deleted file mode 100644 index 5b3d8e7..0000000 --- a/qml/images/settings.png +++ /dev/null | |||
Binary files differ | |||