2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Improve Emoji-Stickers-GIFs panel.

Fix broken minimal panel size.
Remove HistoryWidget context menu from the panel.
This commit is contained in:
John Preston
2017-04-16 00:05:57 +03:00
parent 6226cf2809
commit 8e241e8b78
6 changed files with 16 additions and 15 deletions

View File

@@ -98,8 +98,10 @@ void TabbedPanel::updateContentHeight() {
}
auto addedHeight = innerPadding().top() + innerPadding().bottom();
auto wantedContentHeight = qRound(st::emojiPanHeightRatio * _bottom) - addedHeight;
auto contentHeight = snap(wantedContentHeight, st::emojiPanMinHeight, st::emojiPanMaxHeight);
auto marginsHeight = _selector->marginTop() + _selector->marginBottom();
auto availableHeight = _bottom - marginsHeight;
auto wantedContentHeight = qRound(st::emojiPanHeightRatio * availableHeight) - addedHeight;
auto contentHeight = marginsHeight + snap(wantedContentHeight, st::emojiPanMinHeight, st::emojiPanMaxHeight);
auto resultTop = _bottom - addedHeight - contentHeight;
if (contentHeight == _contentHeight) {
move(x(), resultTop);