summary refs log tree commit diff
path: root/src/emoji/Panel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-07-25 11:40:18 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-07-25 11:49:15 +0200
commit78ed78c410b2aeed2dd9c5de249cb625fb5153be (patch)
tree07e521fc5f9317a16ee0e1a6baa6a2e08440871e /src/emoji/Panel.cpp
parentMerge branch '0.7.0-dev' of ssh://github.com/Nheko-Reborn/nheko into 0.7.0-dev (diff)
downloadnheko-78ed78c410b2aeed2dd9c5de249cb625fb5153be.tar.xz
Improve layout of Emoji Picker
Respect system styling
Increase size of emojis (to remove empty space)
Add hover effect (partially adresses #41)
Less hardcoding of sizes
Use emoji font (color)
Diffstat (limited to 'src/emoji/Panel.cpp')
-rw-r--r--src/emoji/Panel.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emoji/Panel.cpp b/src/emoji/Panel.cpp

index 710b501e..49ff40c5 100644 --- a/src/emoji/Panel.cpp +++ b/src/emoji/Panel.cpp
@@ -202,14 +202,12 @@ Panel::showCategory(const Category *category) return; // HACK - // If we want to go to a previous category and position the label at the top - // the 6*50 offset won't work because not all the categories have the same - // height. To ensure the category is at the top, we move to the top and go as - // normal to the next category. + // We want the top of the category to be visible, so scroll to the top first and then to the + // category if (current > posToGo) this->scrollArea_->ensureVisible(0, 0, 0, 0); - posToGo += 6 * 50; + posToGo += scrollArea_->height(); this->scrollArea_->ensureVisible(0, posToGo, 0, 0); }