[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [spacebar] app/package/contents/ui: [app] Add emojis popup into ConversationPage
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2016-05-14 18:35:25
Message-ID: E1b1ePN-0005D3-Ah () scm ! kde ! org
[Download RAW message or body]
Git commit 1bd3992e1e4aa2f29b877e4c0e11f7a32c1cdb70 by Martin Klapetek.
Committed on 14/05/2016 at 18:34.
Pushed by mklapetek into branch 'master'.
[app] Add emojis popup into ConversationPage
Uses OverlaySheet but it breaks when there are more than one thing in
the ColumnLayout, dunno why, but it will do for now.
M +48 -0 app/package/contents/ui/ConversationPage.qml
http://commits.kde.org/spacebar/1bd3992e1e4aa2f29b877e4c0e11f7a32c1cdb70
diff --git a/app/package/contents/ui/ConversationPage.qml b/app/package/contents/ui/ConversationPage.qml
index 6ca5291..b4b3c49 100644
--- a/app/package/contents/ui/ConversationPage.qml
+++ b/app/package/contents/ui/ConversationPage.qml
@@ -27,6 +27,7 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.telepathy 0.1
Kirigami.Page {
+ id: conversationPage
anchors.fill: parent
// This is somewhat a hack, the type should be Conversation
@@ -35,6 +36,53 @@ Kirigami.Page {
property QtObject conversation
property string pageName: "conversationPage"
+ Kirigami.OverlaySheet {
+ id: emojisRect
+ z: 300
+
+ ColumnLayout {
+ height: conversationPage.height / 3
+ width: conversationPage.width
+
+ GridView {
+ clip: true
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ model: EmojisModel { }
+ cellWidth: Math.floor(width / 9)
+ cellHeight: cellWidth
+
+ delegate: MouseArea {
+ height: 24
+ width: 24
+
+ onClicked: {
+ conversationPage.insertEmoji(model.emojiText);
+ emojisRect.close();
+ conversationPage.focusTextInput();
+ }
+
+ PlasmaCore.IconItem {
+ height: 24
+ width: 24
+ source: model.emojiFullPath
+ }
+ }
+ }
+
+ Button {
+ id: closeEmojis
+ text: i18n("Close")
+ Layout.fillWidth: true
+
+ onClicked: {
+ emojisRect.close();
+ }
+ }
+ }
+ }
+
Loader {
anchors.fill: parent
active: conversation !== null
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic