summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-02-24 15:31:05 (GMT)
committerTobias Markmann <tm@ayena.de>2017-02-24 15:31:05 (GMT)
commitad463f276f11192fcd6ab9a00fffba2b3cca6761 (patch)
tree26c864f81339ae5aba416effd7f26e34467897fd /Swift/QtUI/QtEmojisScroll.cpp
parentd8b09bc1eacdf97366058807cc021f81be171526 (diff)
downloadswift-ad463f276f11192fcd6ab9a00fffba2b3cca6761.zip
swift-ad463f276f11192fcd6ab9a00fffba2b3cca6761.tar.bz2
Fix sorting of emoji categories in the emoji dialog
This also changes the minimal height of the emoji dialog to hold about 8 emoji rows. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the categories are sorted in a more sensible manner and that the dialog at least shows about 8 emoji rows. Change-Id: I8c5518f8d552a581d5073b5f155425580f72938a
Diffstat (limited to 'Swift/QtUI/QtEmojisScroll.cpp')
-rw-r--r--Swift/QtUI/QtEmojisScroll.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Swift/QtUI/QtEmojisScroll.cpp b/Swift/QtUI/QtEmojisScroll.cpp
index 9765aa5..27963a1 100644
--- a/Swift/QtUI/QtEmojisScroll.cpp
+++ b/Swift/QtUI/QtEmojisScroll.cpp
@@ -1,28 +1,29 @@
/*
* Copyright (c) 2016-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/QtUI/QtEmojisScroll.h>
#include <QLayout>
#include <QScrollArea>
#include <QStyle>
#include <Swift/QtUI/QtEmojisGrid.h>
#include <Swift/QtUI/QtRecentEmojisGrid.h>
namespace Swift {
QtEmojisScroll::QtEmojisScroll(QLayout* emojiLayout, QWidget *parent) : QWidget(parent) {
auto selector = new QWidget();
auto scrollArea = new QScrollArea();
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(selector);
selector->setLayout(emojiLayout);
this->setLayout(new QVBoxLayout);
this->layout()->addWidget(scrollArea);
this->layout()->setContentsMargins(0,0,0,0);
+ setMinimumHeight(emojiLayout->itemAt(0)->minimumSize().height() * 8);
}
}