diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp index b7ca8edbcf..d12c2bda7d 100644 --- a/Telegram/SourceFiles/info/info_layer_widget.cpp +++ b/Telegram/SourceFiles/info/info_layer_widget.cpp @@ -280,7 +280,6 @@ QRect LayerWidget::countGeometry(int newWidth) { st::infoLayerTopMaximal); const auto newBottom = newTop; - const auto hasCustomBottomBar = _content->hasCustomBottomBar(); const auto bottomRadius = st::boxRadius; // Top rounding is included in _contentHeight. auto desiredHeight = _contentHeight + bottomRadius; @@ -293,9 +292,7 @@ QRect LayerWidget::countGeometry(int newWidth) { const auto contentWidth = newWidth; auto contentHeight = desiredHeight - contentTop - contentBottom; const auto scrollTillBottom = _content->scrollTillBottom(contentHeight); - auto additionalScroll = hasCustomBottomBar - ? 0 - : std::min(scrollTillBottom, newBottom); + auto additionalScroll = std::min(scrollTillBottom, newBottom); const auto expanding = (_desiredHeight > _contentHeight); diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index 313d8ebfc8..a73a381423 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -816,10 +816,6 @@ QPixmap WrapWidget::grabForShowAnimation( return result; } -bool WrapWidget::hasCustomBottomBar() const { - return _content->scrollBottomSkip() > 0; -} - void WrapWidget::showAnimatedHook( const Window::SectionSlideParams ¶ms) { //if (params.withTabs && _topTabs) { diff --git a/Telegram/SourceFiles/info/info_wrap_widget.h b/Telegram/SourceFiles/info/info_wrap_widget.h index 3fd4157b26..2b248e7d1c 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.h +++ b/Telegram/SourceFiles/info/info_wrap_widget.h @@ -100,8 +100,6 @@ public: QPixmap grabForShowAnimation( const Window::SectionSlideParams ¶ms) override; - [[nodiscard]] bool hasCustomBottomBar() const; - void forceContentRepaint(); bool showInternal( diff --git a/Telegram/SourceFiles/settings/settings_premium.cpp b/Telegram/SourceFiles/settings/settings_premium.cpp index e044a0bc33..b85b13aed7 100644 --- a/Telegram/SourceFiles/settings/settings_premium.cpp +++ b/Telegram/SourceFiles/settings/settings_premium.cpp @@ -550,17 +550,7 @@ QPointer Premium::createPinnedToBottom( st::premiumPreviewBox.button.textTop, outer); }, label->lifetime()); - auto padding = st::settingsPremiumButtonPadding; - const auto paddingBottom = padding.bottom(); - padding.setBottom(paddingBottom - st::boxRadius); - content->add(std::move(result), padding); - - content->add( - object_ptr>( - content, - object_ptr(content, st::boxRadius)) - )->setDuration(0)->toggleOn(_wrap.value( - ) | rpl::map(rpl::mappers::_1 != Info::Wrap::Layer)); + content->add(std::move(result), st::settingsPremiumButtonPadding); return Ui::MakeWeak(not_null{ content }); }