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 } } }