From ef51a76cd4a4ec8aaa8f4622d23b80d2b7f61a71 Mon Sep 17 00:00:00 2001 From: "tg(x)" <*@tg-x.net> Date: Fri, 18 Mar 2016 20:54:40 +0100 Subject: qml: reply under msg in thread --- qml.qrc | 4 +- qml/EgoCreate.qml | 2 +- qml/PlaceCreate.qml | 2 +- qml/PlaceEnter.qml | 6 +- qml/PlaceThread.qml | 155 +++++++++++++++++++++++------------------- qml/images/settings-black.png | Bin 0 -> 527 bytes qml/images/settings-white.png | Bin 0 -> 719 bytes qml/images/settings.png | Bin 557 -> 0 bytes qml/images/settings_dark.png | Bin 527 -> 0 bytes 9 files changed, 92 insertions(+), 77 deletions(-) create mode 100644 qml/images/settings-black.png create mode 100644 qml/images/settings-white.png delete mode 100644 qml/images/settings.png delete mode 100644 qml/images/settings_dark.png diff --git a/qml.qrc b/qml.qrc index d1d5ee7..e4761fa 100644 --- a/qml.qrc +++ b/qml.qrc @@ -42,8 +42,8 @@ qml/images/person.png qml/images/phone.png qml/images/send.png - qml/images/settings_dark.png - qml/images/settings.png + qml/images/settings-black.png + qml/images/settings-white.png qml/images/share.png qml/images/thread_dark.png qml/images/thread.png 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 { Button { text: "Create" onClicked: { - // FIXME: App.gnunet.identity.createEgo(newName.text) + // FIXME: App.createEgo(newName.text) } } } 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 { width: 200 onClicked: { - App.social.createPlace("FIXME: egoPubKey") // FIXME: nameField.text + App.createPlace("FIXME: egoPubKey") // FIXME: nameField.text } } } 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 { FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" } Rectangle { - id:headerBanner + id: headerBanner anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right @@ -126,7 +126,7 @@ Rectangle { } ColumnLayout { - id:dataRow + id: dataRow anchors.top: typeRow.bottom anchors.left: typeRow.left anchors.right: typeRow.right @@ -212,7 +212,7 @@ Rectangle { width: 200 onClicked: { - App.social.enterPlace("FIXME: egoPubKey", publicKeyField.text, originField.text) + App.enterPlace("FIXME: egoPubKey", publicKeyField.text, originField.text) } } } 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 @@ import QtQuick 2.2 -import QtQuick.Window 2.1; -import QtQuick.Controls 1.1 +import QtQuick.Window 2.1 +import QtQuick.Controls 1.4 import QtQuick.Layouts 1.1 import secushare 1.0 @@ -90,7 +90,7 @@ Rectangle { id: messageList anchors.top: forumTitleRectangle.bottom anchors.topMargin: 30 - anchors.bottom: replyField.top + anchors.bottom: parent.bottom anchors.right: parent.right anchors.left: parent.left @@ -107,14 +107,14 @@ Rectangle { Item { id: messageItem width: parent.width - 100 - height: (contentWrapper.height > userWrapper.height) ? contentWrapper.height : userWrapper.height + height: ((contentWrapper.height > userWrapper.height) ? contentWrapper.height : userWrapper.height) + ((replyField.visible) ? replyField.height + 10 : 0); Rectangle { id: userWrapper width: (index == 0) ? 140 : 90 height: (index == 0) ? 140 : 90 anchors.left: parent.left - anchors.leftMargin: (index == 0) ? 0 : 50 + anchors.leftMargin: index * 50 color: "black" opacity: 1.0 @@ -182,6 +182,22 @@ Rectangle { font.family: ubuntuFont.name } + Text { + id: contentReply + + anchors.bottom: parent.bottom + anchors.margins: 10 + + text: "Reply" + font.pointSize: 11 + font.family: ubuntuFont.name + + MouseArea { + anchors.fill: parent + onClicked: replyField.visible = !replyField.visible; + } + } + Text { id: contentDate @@ -194,80 +210,79 @@ Rectangle { horizontalAlignment: Text.AlignRight font.family: ubuntuFont.name } - } - } - } - } - Item { - id: replyField - height: 70 - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom + Item { + id: replyField + visible: false + height: 70 + anchors.left: parent.left + anchors.leftMargin: (index + 1) * 50 + anchors.right: parent.right + anchors.bottom: parent.bottom - Rectangle { - id: userWrapper - width: 60 - height: 60 - color: "black" - opacity: 1.0 + Rectangle { + id: replyUserWrapper + width: 60 + height: 60 + color: "black" + opacity: 1.0 - anchors.left: parent.left - anchors.leftMargin: 5 - anchors.top: parent.top - - Image { - id: messageMiniImage - source: "images/demo/lynX.jpg" - fillMode: Image.PreserveAspectCrop - height: 40 - width: 48 - anchors.left: parent.left - anchors.top: parent.top - anchors.margins: 3 - } + anchors.left: parent.left + anchors.leftMargin: 5 + anchors.top: parent.top - Text { - anchors.top: messageMiniImage.bottom - id: contactText - text: "lynX" - font.pointSize: 10 - width: 55 - height: 15 - anchors.left: parent.left - anchors.leftMargin: 5 - - wrapMode : Text.Wrap - elide : Text.ElideRight - color: "white" - - font.family: ubuntuBIFont.name - font.letterSpacing : -1 - } - } + Image { + id: replyMessageMiniImage + source: "images/demo/lynX.jpg" + fillMode: Image.PreserveAspectCrop + height: 40 + width: 48 + anchors.left: parent.left + anchors.top: parent.top + anchors.margins: 3 + } - TextArea { - anchors.left: userWrapper.right - anchors.right: parent.right - anchors.top: userWrapper.top - anchors.bottom: userWrapper.bottom - anchors.rightMargin: 10 - anchors.leftMargin: 10 - - Keys.onReturnPressed: { - if (Qt.ControlModifier & event.modifiers) - { - thread.talk(text) - cursorPosition = 0 - text = "" - event.accepted = true + Text { + anchors.top: replyMessageMiniImage.bottom + text: "lynX" + font.pointSize: 10 + width: 55 + height: 15 + anchors.left: parent.left + anchors.leftMargin: 5 + + wrapMode : Text.Wrap + elide : Text.ElideRight + color: "white" + + font.family: ubuntuBIFont.name + font.letterSpacing : -1 + } + } + + TextArea { + anchors.left: replyUserWrapper.right + anchors.right: parent.right + anchors.top: replyUserWrapper.top + anchors.bottom: replyUserWrapper.bottom + anchors.rightMargin: 10 + anchors.leftMargin: 10 + + Keys.onReturnPressed: { + if (Qt.ControlModifier & event.modifiers) + { + thread.talk(text) + cursorPosition = 0 + text = "" + event.accepted = true + } + else event.accepted = false + } + } } - else event.accepted = false } } - } } } diff --git a/qml/images/settings-black.png b/qml/images/settings-black.png new file mode 100644 index 0000000..f65ccda Binary files /dev/null and b/qml/images/settings-black.png differ diff --git a/qml/images/settings-white.png b/qml/images/settings-white.png new file mode 100644 index 0000000..0b0a62b Binary files /dev/null and b/qml/images/settings-white.png differ diff --git a/qml/images/settings.png b/qml/images/settings.png deleted file mode 100644 index 5b3d8e7..0000000 Binary files a/qml/images/settings.png and /dev/null differ diff --git a/qml/images/settings_dark.png b/qml/images/settings_dark.png deleted file mode 100644 index f65ccda..0000000 Binary files a/qml/images/settings_dark.png and /dev/null differ -- cgit v1.2.3