From eb8f70994349fafa36b273ef0eddcfb82c1b1b0c Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 23 Apr 2021 15:07:12 +0400 Subject: [PATCH] Show members list in PanelMode::Wide. --- Telegram/SourceFiles/boxes/boxes.style | 4 - Telegram/SourceFiles/boxes/peer_list_box.cpp | 32 ++- Telegram/SourceFiles/boxes/peer_list_box.h | 18 +- .../calls/group/calls_group_members.cpp | 265 +++++++++++++----- .../chat_helpers/chat_helpers.style | 4 - .../chat_helpers/field_autocomplete.cpp | 4 +- Telegram/SourceFiles/dialogs/dialogs.style | 4 - .../SourceFiles/dialogs/dialogs_widget.cpp | 2 +- Telegram/SourceFiles/info/info.style | 5 - .../SourceFiles/info/info_content_widget.cpp | 2 +- Telegram/SourceFiles/passport/passport.style | 3 - .../SourceFiles/settings/settings_intro.cpp | 2 +- .../support/support_autocomplete.cpp | 4 +- Telegram/SourceFiles/ui/chat/chat.style | 1 - .../window/themes/window_theme_editor.cpp | 2 +- 15 files changed, 231 insertions(+), 121 deletions(-) diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index 0e299dd22..2e6ee6905 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -729,10 +729,6 @@ termsAgePadding: margins(22px, 16px, 16px, 0px); themesSmallSkip: 10px; themesBackgroundSize: 120px; -themesScroll: ScrollArea(defaultScrollArea) { - bottomsh: 0px; - topsh: 0px; -} themesMenuToggle: IconButton(defaultIconButton) { width: 44px; height: 44px; diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index 7feb3b1a3..4b5530416 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -529,7 +529,7 @@ QString PeerListRow::generateShortName() { : peer()->shortName(); } -std::shared_ptr PeerListRow::ensureUserpicView() { +std::shared_ptr &PeerListRow::ensureUserpicView() { if (!_userpic) { _userpic = peer()->createUserpicView(); } @@ -588,11 +588,14 @@ void PeerListRow::paintStatusText( _status.drawLeftElided(p, x, y, availableWidth, outerWidth); } -template -void PeerListRow::addRipple(const style::PeerListItem &st, QSize size, QPoint point, UpdateCallback updateCallback) { +template +void PeerListRow::addRipple(const style::PeerListItem &st, MaskGenerator &&maskGenerator, QPoint point, UpdateCallback &&updateCallback) { if (!_ripple) { - auto mask = Ui::RippleAnimation::rectMask(size); - _ripple = std::make_unique(st.button.ripple, std::move(mask), std::move(updateCallback)); + auto mask = maskGenerator(); + if (mask.isNull()) { + return; + } + _ripple = std::make_unique(st.button.ripple, std::move(mask), std::forward(updateCallback)); } _ripple->add(point); } @@ -1241,9 +1244,16 @@ void PeerListContent::mousePressEvent(QMouseEvent *e) { row->addActionRipple(point, std::move(updateCallback)); } } else { - auto size = QSize(width(), _rowHeight); auto point = mapFromGlobal(QCursor::pos()) - QPoint(0, getRowTop(_selected.index)); - row->addRipple(_st.item, size, point, std::move(updateCallback)); + if (_mode == Mode::Custom) { + row->addRipple(_st.item, _controller->customRowRippleMaskGenerator(), point, std::move(updateCallback)); + } else { + const auto maskGenerator = [&] { + return Ui::RippleAnimation::rectMask( + QSize(width(), _rowHeight)); + }; + row->addRipple(_st.item, maskGenerator, point, std::move(updateCallback)); + } } } if (anim::Disabled()) { @@ -1779,7 +1789,11 @@ void PeerListContent::selectByMouse(QPoint globalPosition) { auto in = parentWidget()->rect().contains(parentWidget()->mapFromGlobal(globalPosition)); auto selected = Selected(); auto rowsPointY = point.y() - rowsTop(); - selected.index.value = (in && rowsPointY >= 0 && rowsPointY < shownRowsCount() * _rowHeight) ? (rowsPointY / _rowHeight) : -1; + selected.index.value = (in + && rowsPointY >= 0 + && rowsPointY < shownRowsCount() * _rowHeight) + ? (rowsPointY / _rowHeight) + : -1; if (selected.index.value >= 0) { const auto row = getRow(selected.index); if (row->disabled() @@ -1787,7 +1801,7 @@ void PeerListContent::selectByMouse(QPoint globalPosition) { && !_controller->customRowSelectionPoint( row, point.x(), - rowsPointY))) { + rowsPointY - (selected.index.value * _rowHeight)))) { selected = Selected(); } else if (!customMode) { if (getActiveActionRect(row, selected.index).contains(point)) { diff --git a/Telegram/SourceFiles/boxes/peer_list_box.h b/Telegram/SourceFiles/boxes/peer_list_box.h index 32b6b26e5..abce0b55b 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.h +++ b/Telegram/SourceFiles/boxes/peer_list_box.h @@ -82,7 +82,7 @@ public: return _id; } - [[nodiscard]] std::shared_ptr ensureUserpicView(); + [[nodiscard]] std::shared_ptr &ensureUserpicView(); [[nodiscard]] virtual QString generateName(); [[nodiscard]] virtual QString generateShortName(); @@ -172,12 +172,12 @@ public: void finishCheckedAnimation(); void invalidatePixmapsCache(); - template + template void addRipple( const style::PeerListItem &st, - QSize size, + MaskGenerator &&maskGenerator, QPoint point, - UpdateCallback updateCallback); + UpdateCallback &&updateCallback); void stopLastRipple(); void paintRipple(Painter &p, int x, int y, int outerWidth); void paintUserpic( @@ -451,21 +451,23 @@ public: return false; } [[nodiscard]] virtual int customRowHeight() { - Unexpected("Unimplemented PeerListController::customRowHeight."); + Unexpected("PeerListController::customRowHeight."); } virtual void customRowPaint( Painter &p, crl::time now, not_null row, bool selected) { - Unexpected("Unimplemented PeerListController::customRowPaint."); + Unexpected("PeerListController::customRowPaint."); } [[nodiscard]] virtual bool customRowSelectionPoint( not_null row, int x, int y) { - Unexpected( - "Unimplemented PeerListController::customRowSelectionPoint."); + Unexpected("PeerListController::customRowSelectionPoint."); + } + [[nodiscard]] virtual Fn customRowRippleMaskGenerator() { + Unexpected("PeerListController::customRowRippleMaskGenerator."); } [[nodiscard]] virtual rpl::producer onlineCountValue() const; diff --git a/Telegram/SourceFiles/calls/group/calls_group_members.cpp b/Telegram/SourceFiles/calls/group/calls_group_members.cpp index 38ddf3e6b..8c7857476 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_members.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_members.cpp @@ -28,6 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/text/text_utilities.h" #include "ui/effects/ripple_animation.h" #include "ui/effects/cross_line.h" +#include "ui/round_rect.h" #include "core/application.h" // Core::App().domain, Core::App().activeWindow. #include "main/main_domain.h" // Core::App().domain().activate. #include "main/main_session.h" @@ -97,6 +98,7 @@ public: Painter &p, QRect rect, IconState state) = 0; + virtual void rowPaintWideBackground(Painter &p, bool selected) = 0; }; class Row final : public PeerListRow { @@ -174,7 +176,15 @@ public: bool selected, bool actionSelected) override; - auto generatePaintUserpicCallback() -> PaintRoundImageCallback override; + PaintRoundImageCallback generatePaintUserpicCallback() override; + void paintComplexUserpic( + Painter &p, + int x, + int y, + int outerWidth, + int size, + PanelMode mode, + bool selected = false); void paintStatusText( Painter &p, @@ -243,6 +253,20 @@ private: void ensureUserpicCache( std::shared_ptr &view, int size); + bool paintVideo(Painter &p, int x, int y, int size, PanelMode mode); + [[nodiscard]] static std::tuple UserpicInWideMode( + int x, + int y, + int size); + void paintBlobs(Painter &p, int x, int y, int size, PanelMode mode); + void paintScaledUserpic( + Painter &p, + std::shared_ptr &userpic, + int x, + int y, + int outerWidth, + int size, + PanelMode mode); const not_null _delegate; State _state = State::Inactive; @@ -305,6 +329,7 @@ public: Painter &p, QRect rect, IconState state) override; + void rowPaintWideBackground(Painter &p, bool selected) override; int customRowHeight() override; void customRowPaint( @@ -316,6 +341,7 @@ public: not_null row, int x, int y) override; + Fn customRowRippleMaskGenerator() override; private: [[nodiscard]] std::unique_ptr createRowForMe(); @@ -383,6 +409,8 @@ private: Ui::CrossLineAnimation _inactiveCrossLine; Ui::CrossLineAnimation _coloredCrossLine; + Ui::RoundRect _wideRoundRectSelected; + Ui::RoundRect _wideRoundRect; rpl::lifetime _lifetime; @@ -653,78 +681,142 @@ void Row::ensureUserpicCache( } } -auto Row::generatePaintUserpicCallback() -> PaintRoundImageCallback { - auto userpic = ensureUserpicView(); - return [=](Painter &p, int x, int y, int outerWidth, int size) mutable { - const auto videoSize = _videoTrackShown - ? _videoTrackShown->frameSize() - : QSize(); - if (!videoSize.isEmpty()) { - const auto resize = (videoSize.width() > videoSize.height()) - ? QSize(videoSize.width() * size / videoSize.height(), size) - : QSize(size, videoSize.height() * size / videoSize.width()); - const auto request = Webrtc::FrameRequest{ - .resize = resize * cIntRetinaFactor(), - .outer = QSize(size, size) * cIntRetinaFactor(), - }; - const auto frame = _videoTrackShown->frame(request); - auto copy = frame; // #TODO calls optimize. - copy.detach(); - Images::prepareCircle(copy); - p.drawImage( - QRect(QPoint(x, y), copy.size() / cIntRetinaFactor()), - copy); - _videoTrackShown->markFrameShown(); - return; - } else if (_videoTrackShown) { - // We could skip the first notification. - _videoTrackShown->markFrameShown(); - } - if (_blobsAnimation) { - const auto mutedByMe = (_state == State::MutedByMe); - const auto shift = QPointF(x + size / 2., y + size / 2.); - auto hq = PainterHighQualityEnabler(p); - p.translate(shift); - const auto brush = mutedByMe - ? st::groupCallMemberMutedIcon->b - : anim::brush( - st::groupCallMemberInactiveStatus, - st::groupCallMemberActiveStatus, - _speakingAnimation.value(_speaking ? 1. : 0.)); - _blobsAnimation->blobs.paint(p, brush); - p.translate(-shift); - p.setOpacity(1.); - - const auto enter = _blobsAnimation->enter; - const auto &minScale = kUserpicMinScale; - const auto scaleUserpic = minScale - + (1. - minScale) * _blobsAnimation->blobs.currentLevel(); - const auto scale = scaleUserpic * enter + 1. * (1. - enter); - if (scale == 1.) { - peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size); - } else { - ensureUserpicCache(userpic, size); - - PainterHighQualityEnabler hq(p); - - auto target = QRect( - x + (1 - kWideScale) / 2 * size, - y + (1 - kWideScale) / 2 * size, - kWideScale * size, - kWideScale * size); - auto shrink = anim::interpolate( - (1 - kWideScale) / 2 * size, - 0, - scale); - auto margins = QMargins(shrink, shrink, shrink, shrink); - p.drawImage( - target.marginsAdded(margins), - _blobsAnimation->userpicCache); - } - } else { - peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size); - } +bool Row::paintVideo(Painter &p, int x, int y, int size, PanelMode mode) { + if (!_videoTrackShown) { + return false; + } + const auto guard = gsl::finally([&] { + _videoTrackShown->markFrameShown(); + }); + const auto videoSize = _videoTrackShown->frameSize(); + if (videoSize.isEmpty()) { + return false; + } + const auto resize = (videoSize.width() > videoSize.height()) + ? QSize(videoSize.width() * size / videoSize.height(), size) + : QSize(size, videoSize.height() * size / videoSize.width()); + const auto request = Webrtc::FrameRequest{ + .resize = resize * cIntRetinaFactor(), + .outer = QSize(size, size) * cIntRetinaFactor(), }; + const auto frame = _videoTrackShown->frame(request); + auto copy = frame; // #TODO calls optimize. + copy.detach(); + if (mode == PanelMode::Default) { + Images::prepareCircle(copy); + } else { + Images::prepareRound(copy, ImageRoundRadius::Large); + } + p.drawImage( + QRect(QPoint(x, y), copy.size() / cIntRetinaFactor()), + copy); + return true; +} + +std::tuple Row::UserpicInWideMode(int x, int y, int size) { + const auto useSize = st::groupCallMembersList.item.photoSize; + const auto skip = (size - useSize) / 2; + return { x + skip, y + skip, useSize }; +} + +void Row::paintBlobs(Painter &p, int x, int y, int size, PanelMode mode) { + if (!_blobsAnimation) { + return; + } + if (mode == PanelMode::Wide) { + std::tie(x, y, size) = UserpicInWideMode(x, y, size); + } + const auto mutedByMe = (_state == State::MutedByMe); + const auto shift = QPointF(x + size / 2., y + size / 2.); + auto hq = PainterHighQualityEnabler(p); + p.translate(shift); + const auto brush = mutedByMe + ? st::groupCallMemberMutedIcon->b + : anim::brush( + st::groupCallMemberInactiveStatus, + st::groupCallMemberActiveStatus, + _speakingAnimation.value(_speaking ? 1. : 0.)); + _blobsAnimation->blobs.paint(p, brush); + p.translate(-shift); + p.setOpacity(1.); +} + +void Row::paintScaledUserpic( + Painter &p, + std::shared_ptr &userpic, + int x, + int y, + int outerWidth, + int size, + PanelMode mode) { + if (mode == PanelMode::Wide) { + std::tie(x, y, size) = UserpicInWideMode(x, y, size); + } + if (!_blobsAnimation) { + peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size); + return; + } + const auto enter = _blobsAnimation->enter; + const auto &minScale = kUserpicMinScale; + const auto scaleUserpic = minScale + + (1. - minScale) * _blobsAnimation->blobs.currentLevel(); + const auto scale = scaleUserpic * enter + 1. * (1. - enter); + if (scale == 1.) { + peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size); + return; + } + ensureUserpicCache(userpic, size); + + PainterHighQualityEnabler hq(p); + + auto target = QRect( + x + (1 - kWideScale) / 2 * size, + y + (1 - kWideScale) / 2 * size, + kWideScale * size, + kWideScale * size); + auto shrink = anim::interpolate( + (1 - kWideScale) / 2 * size, + 0, + scale); + auto margins = QMargins(shrink, shrink, shrink, shrink); + p.drawImage( + target.marginsAdded(margins), + _blobsAnimation->userpicCache); +} + +auto Row::generatePaintUserpicCallback() -> PaintRoundImageCallback { + return [=](Painter &p, int x, int y, int outerWidth, int size) { + paintComplexUserpic(p, x, y, outerWidth, size, PanelMode::Default); + }; +} + +void Row::paintComplexUserpic( + Painter &p, + int x, + int y, + int outerWidth, + int size, + PanelMode mode, + bool selected) { + if (mode == PanelMode::Wide) { + if (paintVideo(p, x, y, size, mode)) { + return; + } + _delegate->rowPaintWideBackground(p, selected); + paintRipple(p, x, y, outerWidth); + } + paintBlobs(p, x, y, size, mode); + if (mode == PanelMode::Default && paintVideo(p, x, y, size, mode)) { + return; + } + paintScaledUserpic( + p, + ensureUserpicView(), + x, + y, + outerWidth, + size, + mode); } int Row::statusIconWidth() const { @@ -976,7 +1068,9 @@ MembersController::MembersController( , _menuParent(menuParent) , _raisedHandStatusRemoveTimer([=] { scheduleRaisedHandStatusRemove(); }) , _inactiveCrossLine(st::groupCallMemberInactiveCrossLine) -, _coloredCrossLine(st::groupCallMemberColoredCrossLine) { +, _coloredCrossLine(st::groupCallMemberColoredCrossLine) +, _wideRoundRectSelected(ImageRoundRadius::Large, st::groupCallMembersBgOver) +, _wideRoundRect(ImageRoundRadius::Large, st::groupCallMembersBg) { setupListChangeViewers(); style::PaletteChanged( @@ -1605,6 +1699,12 @@ void MembersController::rowPaintIcon( _inactiveCrossLine.paint(p, left, top, crossProgress, iconColor); } +void MembersController::rowPaintWideBackground(Painter &p, bool selected) { + (selected ? _wideRoundRectSelected : _wideRoundRect).paint( + p, + { QPoint(), st::groupCallNarrowSize }); +} + int MembersController::customRowHeight() { return st::groupCallNarrowSize.height() + st::groupCallNarrowRowSkip; } @@ -1615,6 +1715,15 @@ void MembersController::customRowPaint( not_null row, bool selected) { const auto real = static_cast(row.get()); + const auto width = st::groupCallNarrowSize.width(); + real->paintComplexUserpic( + p, + 0, + 0, + width, + width, + PanelMode::Wide, + selected); } bool MembersController::customRowSelectionPoint( @@ -1624,6 +1733,14 @@ bool MembersController::customRowSelectionPoint( return y < st::groupCallNarrowSize.height(); } +Fn MembersController::customRowRippleMaskGenerator() { + return [] { + return Ui::RippleAnimation::roundRectMask( + st::groupCallNarrowSize, + st::roundRadiusLarge); + }; +} + auto MembersController::kickParticipantRequests() const -> rpl::producer>{ return _kickParticipantRequests.events(); @@ -1938,7 +2055,7 @@ Members::Members( not_null call) : RpWidget(parent) , _call(call) -, _scroll(this, st::defaultSolidScroll) +, _scroll(this) , _listController(std::make_unique(call, parent)) { setupAddMember(call); setupList(); diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 25ae77ad8..58880770d 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -248,10 +248,6 @@ emojiSuggestionsPadding: margins(emojiColorsPadding, 0px, emojiColorsPadding, 0p emojiSuggestionsFadeAfter: 20px; mentionHeight: 40px; -mentionScroll: ScrollArea(defaultScrollArea) { - topsh: 0px; - bottomsh: 0px; -} mentionPadding: margins(8px, 5px, 8px, 5px); mentionTop: 11px; mentionFont: linkFont; diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index 1a318aa51..30fc60d0e 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -140,7 +140,7 @@ FieldAutocomplete::FieldAutocomplete( not_null controller) : RpWidget(parent) , _controller(controller) -, _scroll(this, st::mentionScroll) { +, _scroll(this) { hide(); _scroll->setGeometry(rect()); @@ -759,7 +759,7 @@ void FieldAutocomplete::Inner::paintEvent(QPaintEvent *e) { auto htagwidth = width() - st::mentionPadding.right() - htagleft - - st::mentionScroll.width; + - st::defaultScrollArea.width; if (!_srows->empty()) { int32 rows = rowscount(_srows->size(), _stickersPerRow); diff --git a/Telegram/SourceFiles/dialogs/dialogs.style b/Telegram/SourceFiles/dialogs/dialogs.style index c12055e8d..e71c779a4 100644 --- a/Telegram/SourceFiles/dialogs/dialogs.style +++ b/Telegram/SourceFiles/dialogs/dialogs.style @@ -51,10 +51,6 @@ dialogsSkip: 8px; dialogsWidthDuration: 120; dialogsTextWidthMin: 150px; -dialogsScroll: ScrollArea(defaultScrollArea) { - topsh: 0px; - bottomsh: 0px; -} dialogsTextPalette: TextPalette(defaultTextPalette) { linkFg: dialogsTextFgService; diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index a174fa90b..5641540c5 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -174,7 +174,7 @@ Widget::Widget( object_ptr(this, st::dialogsCalendar)) , _cancelSearch(_searchControls, st::dialogsCancelSearch) , _lockUnlock(_searchControls, st::dialogsLock) -, _scroll(this, st::dialogsScroll) +, _scroll(this) , _scrollToTop(_scroll, st::dialogsToUp) , _singleMessageSearch(&controller->session()) { _inner = _scroll->setOwnedWidget(object_ptr(this, controller)); diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index d6634d9b9..be68973b4 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -37,11 +37,6 @@ infoToggle: InfoToggle { rippleAreaPadding: 8px; } -infoScroll: ScrollArea(defaultScrollArea) { - bottomsh: 0px; - topsh: 0px; -} - infoMediaSearch: SearchFieldRow { height: 44px; padding: margins(8px, 6px, 8px, 6px); diff --git a/Telegram/SourceFiles/info/info_content_widget.cpp b/Telegram/SourceFiles/info/info_content_widget.cpp index c52cb2fb8..c9789093c 100644 --- a/Telegram/SourceFiles/info/info_content_widget.cpp +++ b/Telegram/SourceFiles/info/info_content_widget.cpp @@ -37,7 +37,7 @@ ContentWidget::ContentWidget( not_null controller) : RpWidget(parent) , _controller(controller) -, _scroll(this, st::infoScroll) { +, _scroll(this) { using namespace rpl::mappers; setAttribute(Qt::WA_OpaquePaintEvent); diff --git a/Telegram/SourceFiles/passport/passport.style b/Telegram/SourceFiles/passport/passport.style index 81b7b1cf6..a0d422282 100644 --- a/Telegram/SourceFiles/passport/passport.style +++ b/Telegram/SourceFiles/passport/passport.style @@ -61,9 +61,6 @@ passportPasswordForgotBottom: 36px; passportPanelScroll: ScrollArea(defaultScrollArea) { deltat: 6px; deltab: 6px; - - topsh: 0px; - bottomsh: 0px; } passportPanelAuthorize: RoundButton(passportPasswordSubmit) { diff --git a/Telegram/SourceFiles/settings/settings_intro.cpp b/Telegram/SourceFiles/settings/settings_intro.cpp index 44f0ef147..ec7f1cdbb 100644 --- a/Telegram/SourceFiles/settings/settings_intro.cpp +++ b/Telegram/SourceFiles/settings/settings_intro.cpp @@ -217,7 +217,7 @@ IntroWidget::IntroWidget( not_null window) : RpWidget(parent) , _wrap(this) -, _scroll(Ui::CreateChild(_wrap.data(), st::infoScroll)) +, _scroll(Ui::CreateChild(_wrap.data())) , _topShadow(this) { _wrap->setAttribute(Qt::WA_OpaquePaintEvent); _wrap->paintRequest( diff --git a/Telegram/SourceFiles/support/support_autocomplete.cpp b/Telegram/SourceFiles/support/support_autocomplete.cpp index d601e5611..fdf7c105d 100644 --- a/Telegram/SourceFiles/support/support_autocomplete.cpp +++ b/Telegram/SourceFiles/support/support_autocomplete.cpp @@ -407,9 +407,7 @@ void Autocomplete::setupContent() { rpl::single(qsl("Search for templates"))), // #TODO hard_lang st::autocompleteSearchPadding); const auto input = inputWrap->entity(); - const auto scroll = Ui::CreateChild( - this, - st::mentionScroll); + const auto scroll = Ui::CreateChild(this); const auto inner = scroll->setOwnedWidget(object_ptr(scroll)); diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index a89ff17e7..3fa8ca553 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -60,7 +60,6 @@ historyScroll: ScrollArea(defaultScrollArea) { deltat: 3px; deltab: 3px; - topsh: 0px; bottomsh: -1px; } diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp index bfd6a42c9..59a7a5ddf 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp @@ -649,7 +649,7 @@ Editor::Editor( const Data::CloudTheme &cloud) : _window(window) , _cloud(cloud) -, _scroll(this, st::themesScroll) +, _scroll(this) , _close(this, st::defaultMultiSelect.fieldCancel) , _menuToggle(this, st::themesMenuToggle) , _select(this, st::defaultMultiSelect, tr::lng_country_ph())