From 15cc48c6f8540f8f47812637702cba053406c735 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 20 Jul 2020 14:46:15 -0400 Subject: [PATCH] feat: add mock emoji menu in popup menu for chat --- ui/app/AppLayouts/Chat/ChatColumn.qml | 46 +++++++++++++++++++ ui/app/AppLayouts/Chat/ChatColumn/Message.qml | 2 + ui/app/img/emojiReactions/angry.svg | 18 ++++++++ ui/app/img/emojiReactions/heart.svg | 10 ++++ ui/app/img/emojiReactions/laughing.svg | 15 ++++++ ui/app/img/emojiReactions/sad.svg | 28 +++++++++++ ui/app/img/emojiReactions/thumbsDown.svg | 15 ++++++ ui/app/img/emojiReactions/thumbsUp.svg | 15 ++++++ vendor/status-go | 2 +- 9 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 ui/app/img/emojiReactions/angry.svg create mode 100644 ui/app/img/emojiReactions/heart.svg create mode 100644 ui/app/img/emojiReactions/laughing.svg create mode 100644 ui/app/img/emojiReactions/sad.svg create mode 100644 ui/app/img/emojiReactions/thumbsDown.svg create mode 100644 ui/app/img/emojiReactions/thumbsUp.svg diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index ec7d2bdd0d..f83f856124 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -92,6 +92,52 @@ StackLayout { PopupMenu { id: messageContextMenu + width: emojiRow.width + + Row { + id: emojiRow + spacing: Style.current.smallPadding + leftPadding: Style.current.smallPadding + rightPadding: Style.current.smallPadding + bottomPadding: Style.current.padding + + SVGImage { + source: "../../img/emojiReactions/heart.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + SVGImage { + source: "../../img/emojiReactions/thumbsUp.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + SVGImage { + source: "../../img/emojiReactions/thumbsDown.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + SVGImage { + source: "../../img/emojiReactions/laughing.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + SVGImage { + source: "../../img/emojiReactions/sad.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + SVGImage { + source: "../../img/emojiReactions/angry.svg" + width: 32 + fillMode: Image.PreserveAspectFit + } + } + + Separator { + anchors.topMargin: 0 + anchors.top: emojiRow.bottom + } + Action { id: viewProfileAction //% "View profile" diff --git a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml index 0d9fe9a139..6ff730348a 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml @@ -54,6 +54,8 @@ Item { SelectedMessage.set(messageId, fromAuthor); profileClick(userName, fromAuthor, identicon); messageContextMenu.popup() + // Position the center of the menu where the mouse is + messageContextMenu.x = messageContextMenu.x - messageContextMenu.width / 2 } Loader { diff --git a/ui/app/img/emojiReactions/angry.svg b/ui/app/img/emojiReactions/angry.svg new file mode 100644 index 0000000000..0b8ae1034c --- /dev/null +++ b/ui/app/img/emojiReactions/angry.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/ui/app/img/emojiReactions/heart.svg b/ui/app/img/emojiReactions/heart.svg new file mode 100644 index 0000000000..6eccf33452 --- /dev/null +++ b/ui/app/img/emojiReactions/heart.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ui/app/img/emojiReactions/laughing.svg b/ui/app/img/emojiReactions/laughing.svg new file mode 100644 index 0000000000..ea81409ca7 --- /dev/null +++ b/ui/app/img/emojiReactions/laughing.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ui/app/img/emojiReactions/sad.svg b/ui/app/img/emojiReactions/sad.svg new file mode 100644 index 0000000000..8ed2c8baa7 --- /dev/null +++ b/ui/app/img/emojiReactions/sad.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/app/img/emojiReactions/thumbsDown.svg b/ui/app/img/emojiReactions/thumbsDown.svg new file mode 100644 index 0000000000..f26e4e4444 --- /dev/null +++ b/ui/app/img/emojiReactions/thumbsDown.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ui/app/img/emojiReactions/thumbsUp.svg b/ui/app/img/emojiReactions/thumbsUp.svg new file mode 100644 index 0000000000..9b152f40cc --- /dev/null +++ b/ui/app/img/emojiReactions/thumbsUp.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/vendor/status-go b/vendor/status-go index 0b3cdf7362..2d13ccf5ec 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 0b3cdf7362bbdf9ba7fc11da803105f9417dfbac +Subproject commit 2d13ccf5ec3db7e48d7a96a7954be57edb96f12f