diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 2a0eec48d5..9df1cf2c8e 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -444,6 +444,12 @@ stickersEmojiPickerStripBubbleRight: 20px; stickersEmojiPickerSelectedBg: windowBgActive; stickersEmojiPickerSelectedFg: windowBgActive; stickersEmojiPickerHeaderFg: windowSubTextFg; +stickersEmojiPickerScroll: ScrollArea(boxScroll) { + width: 14px; + deltax: 5px; + deltat: 4px; + deltab: 18px; +} stickersEmojiPickerAbout: FlatLabel(defaultFlatLabel) { minWidth: 100px; align: align(top); @@ -463,6 +469,7 @@ stickersEmojiPickerSectionHeader: FlatLabel(defaultFlatLabel) { stickersEmojiPickerExpandIcon: icon {{ "intro_country_dropdown", windowSubTextFg }}; stickersEmojiPickerCollapseIcon: icon {{ "intro_country_dropdown-flip_vertical", windowSubTextFg }}; stickersEmojiPickerExpandSize: 24px; +stickersEmojiPickerExpandBg: windowBgRipple; stickersEmojiPickerBoxShadow: BoxShadow { blurRadius: 20px; offset: point(0px, 6px); diff --git a/Telegram/SourceFiles/chat_helpers/emoji_picker_overlay.cpp b/Telegram/SourceFiles/chat_helpers/emoji_picker_overlay.cpp index 4671fa1cac..da24cd1d80 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_picker_overlay.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_picker_overlay.cpp @@ -420,6 +420,10 @@ EmojiPickerOverlay::EmojiPickerOverlay( _expandButton->paintRequest( ) | rpl::on_next([=](const QRect &clip) { auto p = QPainter(_expandButton); + auto hq = PainterHighQualityEnabler(p); + p.setPen(Qt::NoPen); + p.setBrush(st::stickersEmojiPickerExpandBg); + p.drawEllipse(_expandButton->rect()); const auto &icon = _expanded.current() ? st::stickersEmojiPickerCollapseIcon : st::stickersEmojiPickerExpandIcon; @@ -428,7 +432,9 @@ EmojiPickerOverlay::EmojiPickerOverlay( icon.paint(p, x, y, _expandButton->width()); }, _expandButton->lifetime()); - _scroll = std::make_unique(this); + _scroll = std::make_unique( + this, + st::stickersEmojiPickerScroll); _scroll->setFrameStyle(QFrame::NoFrame); _scroll->hide(); const auto gridPtr = _scroll->setOwnedWidget( @@ -634,13 +640,18 @@ void EmojiPickerOverlay::relayout() { const auto scrollH = std::max( 0, bubbleBottom - scrollTop - pad.bottom()); + const auto scrollContentWidth = bubble.width() + - pad.left() + - pad.right(); + const auto scrollAreaWidth = scrollContentWidth + + pad.right(); _scroll->setGeometry( bubble.left() + pad.left(), scrollTop, - bubble.width() - pad.left() - pad.right(), + scrollAreaWidth, scrollH); if (_grid) { - _grid->resizeGetHeight(_scroll->width()); + _grid->resizeGetHeight(scrollContentWidth); } } }