diff options
author | tg(x) <*@tg-x.net> | 2016-03-23 20:09:24 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-03-23 20:09:24 +0100 |
commit | 6aee7048dedc5c76232b890ec324b8d6c52ce60a (patch) | |
tree | 28f2e9aa6801323f17cb8b8bc040d9b63970f3df | |
parent | 563e4907fef32f1412a41ea83a80176be65b1a58 (diff) | |
download | secushare-6aee7048dedc5c76232b890ec324b8d6c52ce60a.tar.gz secushare-6aee7048dedc5c76232b890ec324b8d6c52ce60a.zip |
qml: right side nav
-rw-r--r-- | qml/PlaceThread.qml | 1 | ||||
-rw-r--r-- | qml/SideNymList.qml | 20 | ||||
-rw-r--r-- | qml/SideThreadList.qml | 49 | ||||
-rw-r--r-- | qml/main.qml | 92 |
4 files changed, 66 insertions, 96 deletions
diff --git a/qml/PlaceThread.qml b/qml/PlaceThread.qml index 9e2df18..ade60d2 100644 --- a/qml/PlaceThread.qml +++ b/qml/PlaceThread.qml | |||
@@ -9,6 +9,7 @@ Rectangle { | |||
9 | color: "white" | 9 | color: "white" |
10 | 10 | ||
11 | property var thread: null | 11 | property var thread: null |
12 | property bool editable: false // FIXME | ||
12 | 13 | ||
13 | Rectangle { | 14 | Rectangle { |
14 | anchors.fill: parent | 15 | anchors.fill: parent |
diff --git a/qml/SideNymList.qml b/qml/SideNymList.qml index 29f6392..8d629e5 100644 --- a/qml/SideNymList.qml +++ b/qml/SideNymList.qml | |||
@@ -33,6 +33,26 @@ Rectangle { | |||
33 | 33 | ||
34 | Rectangle { height: 5 } | 34 | Rectangle { height: 5 } |
35 | 35 | ||
36 | ColumnLayout { | ||
37 | anchors.right: parent.right | ||
38 | width: parent.width - 8 | ||
39 | spacing: 0 | ||
40 | |||
41 | Rectangle { | ||
42 | color: "white" | ||
43 | |||
44 | height: 30 | ||
45 | width: parent.width | ||
46 | |||
47 | Text { | ||
48 | text: qsTr("PARTICIPANTS") | ||
49 | anchors.centerIn: parent | ||
50 | font.pointSize: 22 | ||
51 | font.family: bebasFont.name | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | |||
36 | ListModel { | 56 | ListModel { |
37 | id: nymListModel | 57 | id: nymListModel |
38 | 58 | ||
diff --git a/qml/SideThreadList.qml b/qml/SideThreadList.qml index 872d6b0..210cfa1 100644 --- a/qml/SideThreadList.qml +++ b/qml/SideThreadList.qml | |||
@@ -32,25 +32,44 @@ Rectangle { | |||
32 | 32 | ||
33 | Rectangle { height: 5 } | 33 | Rectangle { height: 5 } |
34 | 34 | ||
35 | Rectangle { | 35 | ColumnLayout { |
36 | id: newThreadButton | ||
37 | anchors.right: parent.right | 36 | anchors.right: parent.right |
38 | width: parent.width - 8 | 37 | width: parent.width - 8 |
39 | height: 30 | 38 | spacing: 0 |
40 | color: "black" | 39 | |
41 | 40 | Rectangle { | |
42 | Image { | 41 | color: "white" |
43 | height: parent.height - 4 | 42 | |
44 | anchors.centerIn: parent | 43 | height: 30 |
45 | fillMode: Image.PreserveAspectFit | 44 | width: parent.width |
46 | source: "images/add.png" | 45 | |
46 | Text { | ||
47 | text: qsTr("TOPICS") | ||
48 | anchors.centerIn: parent | ||
49 | font.pointSize: 22 | ||
50 | font.family: bebasFont.name | ||
51 | } | ||
47 | } | 52 | } |
48 | 53 | ||
49 | MouseArea { | 54 | Rectangle { |
50 | anchors.fill: parent | 55 | id: newThreadButton |
51 | onClicked: { | 56 | width: parent.width |
52 | selectedThread = null | 57 | height: 30 |
53 | currentIndex = threadTab | 58 | color: "black" |
59 | |||
60 | Image { | ||
61 | height: parent.height - 4 | ||
62 | anchors.centerIn: parent | ||
63 | fillMode: Image.PreserveAspectFit | ||
64 | source: "images/add.png" | ||
65 | } | ||
66 | |||
67 | MouseArea { | ||
68 | anchors.fill: parent | ||
69 | onClicked: { | ||
70 | selectedThread = null | ||
71 | currentIndex = threadTab | ||
72 | } | ||
54 | } | 73 | } |
55 | } | 74 | } |
56 | } | 75 | } |
diff --git a/qml/main.qml b/qml/main.qml index acd8127..2bf9062 100644 --- a/qml/main.qml +++ b/qml/main.qml | |||
@@ -303,22 +303,21 @@ ApplicationWindow { | |||
303 | 303 | ||
304 | spacing: 0 | 304 | spacing: 0 |
305 | 305 | ||
306 | ColumnLayout { | 306 | RowLayout { |
307 | anchors.right: parent.right | 307 | anchors.right: parent.right |
308 | width: parent.width - 8 | 308 | width: parent.width - 8 |
309 | spacing: 0 | 309 | spacing: 0 |
310 | 310 | ||
311 | Rectangle { | 311 | Rectangle { |
312 | height: 30 | 312 | height: 30 |
313 | width: parent.width | 313 | width: parent.width / 2 |
314 | color: right.currentIndex == rightThreadsTab ? "white" : "black" | 314 | color: right.currentIndex == rightThreadsTab ? "white" : "black" |
315 | 315 | ||
316 | Text { | 316 | Image { |
317 | text: qsTr("THREADS") | 317 | height: parent.height - 4 |
318 | color: right.currentIndex == rightThreadsTab ? "black" : "white" | ||
319 | anchors.centerIn: parent | 318 | anchors.centerIn: parent |
320 | font.pointSize: 22 | 319 | fillMode: Image.PreserveAspectFit |
321 | font.family: bebasFont.name | 320 | source: right.currentIndex == rightThreadsTab ? "images/thread_dark.png" : "images/thread.png" |
322 | } | 321 | } |
323 | 322 | ||
324 | MouseArea { | 323 | MouseArea { |
@@ -331,15 +330,14 @@ ApplicationWindow { | |||
331 | 330 | ||
332 | Rectangle { | 331 | Rectangle { |
333 | height: 30 | 332 | height: 30 |
334 | width: parent.width | 333 | width: parent.width / 2 |
335 | color: right.currentIndex == rightNymsTab ? "white" : "black" | 334 | color: right.currentIndex == rightNymsTab ? "white" : "black" |
336 | 335 | ||
337 | Text { | 336 | Image { |
338 | text: qsTr("PARTICIPANTS") | 337 | height: parent.height - 4 |
339 | color: right.currentIndex == rightNymsTab ? "black" : "white" | ||
340 | anchors.centerIn: parent | 338 | anchors.centerIn: parent |
341 | font.pointSize: 22 | 339 | fillMode: Image.PreserveAspectFit |
342 | font.family: bebasFont.name | 340 | source: right.currentIndex == rightNymsTab ? "images/group_dark.png" : "images/group.png" |
343 | } | 341 | } |
344 | 342 | ||
345 | MouseArea { | 343 | MouseArea { |
@@ -437,75 +435,7 @@ ApplicationWindow { | |||
437 | } | 435 | } |
438 | } | 436 | } |
439 | } | 437 | } |
440 | /* FIXME | ||
441 | ColumnLayout { | ||
442 | anchors.right: parent.right | ||
443 | width: parent.width - parent.anchors.rightMargin | ||
444 | spacing: 0 | ||
445 | visible: egosTab == rightTabIndex | ||
446 | |||
447 | Rectangle { | ||
448 | color: "white" | ||
449 | 438 | ||
450 | height: 30 | ||
451 | width: parent.width | ||
452 | |||
453 | Text { | ||
454 | text: qsTr("EGOS") | ||
455 | anchors.centerIn: parent | ||
456 | font.pointSize: 22 | ||
457 | font.family: bebasFont.name | ||
458 | } | ||
459 | } | ||
460 | |||
461 | RowLayout { | ||
462 | width: parent.width | ||
463 | spacing: 0 | ||
464 | |||
465 | Rectangle { | ||
466 | id: createEgoButton | ||
467 | width: parent.width | ||
468 | height: 30 | ||
469 | state: "NORMAL" | ||
470 | |||
471 | states: [ | ||
472 | State { | ||
473 | name: "NORMAL" | ||
474 | when: createEgoTab != main.currentIndex // && !enterButtonMa.containsMouse | ||
475 | PropertyChanges { target: createEgoButton; color: "black" } | ||
476 | PropertyChanges { target: createEgoImage; source: "images/add.png" } | ||
477 | }, | ||
478 | State { | ||
479 | name: "HOVER" | ||
480 | //when: ((enterButtonMa.containsMouse) && (main.currentIndex !== 2)) | ||
481 | //PropertyChanges { target: enterButton; color: "#282828" } | ||
482 | }, | ||
483 | State { | ||
484 | name: "PRESSED" | ||
485 | when: createEgoTab == main.currentIndex | ||
486 | PropertyChanges { target: createEgoButton; color: "white" } | ||
487 | PropertyChanges { target: createEgoImage; source: "images/add-black.png" } | ||
488 | } | ||
489 | ] | ||
490 | |||
491 | Image { | ||
492 | id: createEgoImage | ||
493 | height: parent.height - 4 | ||
494 | anchors.centerIn: parent | ||
495 | fillMode: Image.PreserveAspectFit | ||
496 | source: "images/add.png" | ||
497 | } | ||
498 | |||
499 | MouseArea { | ||
500 | id: createEgoArea | ||
501 | anchors.fill: parent | ||
502 | //hoverEnabled: true | ||
503 | onClicked: main.currentIndex = createEgoTab | ||
504 | } | ||
505 | } | ||
506 | } | ||
507 | } | ||
508 | */ | ||
509 | } | 439 | } |
510 | } | 440 | } |
511 | } | 441 | } |