2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 23:45:44 +00:00

Allow TabbedSelector with only emoji.

This commit is contained in:
John Preston
2018-11-22 14:30:48 +04:00
parent ef4f0168f8
commit 8d3f5820ca
5 changed files with 209 additions and 94 deletions

View File

@@ -52,8 +52,8 @@ TabbedPanel::TabbedPanel(
}
});
_selector->showRequests(
) | rpl::start_with_next([this] {
this->showFromSelector();
) | rpl::start_with_next([=] {
showFromSelector();
}, lifetime());
resize(QRect(0, 0, st::emojiPanWidth, st::emojiPanMaxHeight).marginsAdded(innerPadding()).size());
@@ -406,14 +406,6 @@ QRect TabbedPanel::innerRect() const {
return rect().marginsRemoved(innerPadding());
}
QRect TabbedPanel::horizontalRect() const {
return innerRect().marginsRemoved(style::margins(0, st::buttonRadius, 0, st::buttonRadius));
}
QRect TabbedPanel::verticalRect() const {
return innerRect().marginsRemoved(style::margins(st::buttonRadius, 0, st::buttonRadius, 0));
}
bool TabbedPanel::overlaps(const QRect &globalRect) const {
if (isHidden() || !_cache.isNull()) return false;