diff --git a/Telegram/SourceFiles/info/downloads/info_downloads_inner_widget.cpp b/Telegram/SourceFiles/info/downloads/info_downloads_inner_widget.cpp index 611a3a373..33c6d665b 100644 --- a/Telegram/SourceFiles/info/downloads/info_downloads_inner_widget.cpp +++ b/Telegram/SourceFiles/info/downloads/info_downloads_inner_widget.cpp @@ -27,6 +27,8 @@ public: protected: int resizeGetHeight(int newWidth) override; + void paintEvent(QPaintEvent *e) override; + private: object_ptr _text; int _height = 0; @@ -70,6 +72,14 @@ int EmptyWidget::resizeGetHeight(int newWidth) { return _height; } +void EmptyWidget::paintEvent(QPaintEvent *e) { + auto p = QPainter(this); + + const auto iconLeft = (width() - st::infoEmptyFile.width()) / 2; + const auto iconTop = height() - st::infoEmptyIconTop; + st::infoEmptyFile.paint(p, iconLeft, iconTop, width()); +} + InnerWidget::InnerWidget( QWidget *parent, not_null controller) diff --git a/Telegram/SourceFiles/info/downloads/info_downloads_provider.cpp b/Telegram/SourceFiles/info/downloads/info_downloads_provider.cpp index bcebd675d..a4a111114 100644 --- a/Telegram/SourceFiles/info/downloads/info_downloads_provider.cpp +++ b/Telegram/SourceFiles/info/downloads/info_downloads_provider.cpp @@ -114,6 +114,7 @@ void Provider::refreshViewer() { ranges::remove(_elements, item, &Element::item), end(_elements)); } + _fullCount = _elements.size(); if (added) { ranges::sort(_elements, ranges::less(), &Element::started); _refreshed.fire({}); diff --git a/Telegram/SourceFiles/info/downloads/info_downloads_widget.cpp b/Telegram/SourceFiles/info/downloads/info_downloads_widget.cpp index 4bedfa266..33542f4b8 100644 --- a/Telegram/SourceFiles/info/downloads/info_downloads_widget.cpp +++ b/Telegram/SourceFiles/info/downloads/info_downloads_widget.cpp @@ -51,6 +51,11 @@ Widget::Widget( _inner = setInnerWidget(object_ptr( this, controller)); + _inner->setScrollHeightValue(scrollHeightValue()); + _inner->scrollToRequests( + ) | rpl::start_with_next([this](Ui::ScrollToRequest request) { + scrollTo(request); + }, _inner->lifetime()); } bool Widget::showInternal(not_null memento) { diff --git a/Telegram/SourceFiles/info/info_controller.cpp b/Telegram/SourceFiles/info/info_controller.cpp index de45220d0..2a506e39d 100644 --- a/Telegram/SourceFiles/info/info_controller.cpp +++ b/Telegram/SourceFiles/info/info_controller.cpp @@ -325,7 +325,7 @@ rpl::producer Controller::searchEnabledByContent() const { rpl::producer Controller::mediaSourceQueryValue() const { return _searchController ? _searchController->currentQueryValue() - : rpl::never(); // #TODO downloads + : rpl::single(QString()); // #TODO downloads } rpl::producer Controller::mediaSource( diff --git a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp index 462f5e8d0..2df91305d 100644 --- a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp +++ b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp @@ -479,6 +479,7 @@ int ListWidget::resizeGetHeight(int newWidth) { auto ListWidget::findItemByPoint(QPoint point) const -> FoundItem { Expects(!_sections.empty()); + auto sectionIt = findSectionAfterTop(point.y()); if (sectionIt == _sections.end()) { --sectionIt; diff --git a/Telegram/SourceFiles/payments/ui/payments.style b/Telegram/SourceFiles/payments/ui/payments.style index 03247628e..24029a04a 100644 --- a/Telegram/SourceFiles/payments/ui/payments.style +++ b/Telegram/SourceFiles/payments/ui/payments.style @@ -73,12 +73,12 @@ paymentsSectionButton: SettingsButton(infoProfileButton) { padding: margins(68px, 11px, 14px, 9px); } -paymentsIconPaymentMethod: icon {{ "payments/payment_card", menuIconFg }}; -paymentsIconShippingAddress: icon {{ "payments/payment_address", menuIconFg }}; -paymentsIconName: icon {{ "payments/payment_name", menuIconFg }}; -paymentsIconEmail: icon {{ "payments/payment_email", menuIconFg }}; -paymentsIconPhone: icon {{ "payments/payment_phone", menuIconFg }}; -paymentsIconShippingMethod: icon {{ "payments/payment_shipping", menuIconFg }}; +paymentsIconPaymentMethod: icon {{ "payments/payment_card", windowBoldFg }}; +paymentsIconShippingAddress: icon {{ "payments/payment_address", windowBoldFg }}; +paymentsIconName: icon {{ "payments/payment_name", windowBoldFg }}; +paymentsIconEmail: icon {{ "payments/payment_email", windowBoldFg }}; +paymentsIconPhone: icon {{ "payments/payment_phone", windowBoldFg }}; +paymentsIconShippingMethod: icon {{ "payments/payment_shipping", windowBoldFg }}; paymentsField: defaultInputField; paymentsMoneyField: InputField(paymentsField) {