[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [spacebar] app/package/contents/ui: [app] Improve the emojis OverlaySheet significantly
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2016-06-11 18:40:47
Message-ID: E1bBnpv-00088M-61 () scm ! kde ! org
[Download RAW message or body]
Git commit d99d60c952e4018b848b9a328ece22853eb5a99f by Martin Klapetek.
Committed on 11/06/2016 at 18:39.
Pushed by mklapetek into branch 'master'.
[app] Improve the emojis OverlaySheet significantly
M +24 -31 app/package/contents/ui/ConversationPage.qml
http://commits.kde.org/spacebar/d99d60c952e4018b848b9a328ece22853eb5a99f
diff --git a/app/package/contents/ui/ConversationPage.qml b/app/package/con=
tents/ui/ConversationPage.qml
index 63d49ec..a8468af 100644
--- a/app/package/contents/ui/ConversationPage.qml
+++ b/app/package/contents/ui/ConversationPage.qml
@@ -40,48 +40,41 @@ Kirigami.Page {
=
signal focusTextInput();
=
+ EmojisModel {
+ id: emojisModel
+ }
+
+
Kirigami.OverlaySheet {
id: emojisRect
z: 300
=
- ColumnLayout {
- height: conversationPage.height / 3
+ GridView {
+ id: emojisGridView
width: conversationPage.width
+ height: conversationPage.height / 3
+ clip: true
=
- 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();
- }
+ property int iconSize: units.roundToIconSize(cellWidth)
=
- PlasmaCore.IconItem {
- height: 24
- width: 24
- source: model.emojiFullPath
- }
- }
- }
+ model: emojisModel
+ cellWidth: Math.floor(width / 10)
+ cellHeight: cellWidth
=
- Button {
- id: closeEmojis
- text: i18n("Close")
- Layout.fillWidth: true
+ delegate: MouseArea {
+ height: emojisGridView.iconSize
+ width: emojisGridView.iconSize
=
onClicked: {
+ conversationPage.insertEmoji(model.emojiText);
emojisRect.close();
+ conversationPage.focusTextInput();
+ }
+
+ PlasmaCore.IconItem {
+ height: emojisGridView.iconSize
+ width: emojisGridView.iconSize
+ source: model.emojiFullPath
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic