From 1448cea01c7a917e084765306551d9e757bd41d5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 22 Apr 2024 12:29:29 +0400 Subject: [PATCH] Fix ripple in active recommendation row. --- Telegram/SourceFiles/boxes/peer_list_box.cpp | 11 ++++++++--- Telegram/SourceFiles/boxes/peer_list_box.h | 7 ++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index 99da561228..7aa48aaa38 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -820,9 +820,14 @@ void PeerListRow::stopLastRipple() { } } -void PeerListRow::paintRipple(Painter &p, int x, int y, int outerWidth) { +void PeerListRow::paintRipple( + Painter &p, + const style::PeerListItem &st, + int x, + int y, + int outerWidth) { if (_ripple) { - _ripple->paint(p, x, y, outerWidth); + _ripple->paint(p, x, y, outerWidth, &st.button.ripple.color->c); if (_ripple->empty()) { _ripple.reset(); } @@ -1735,7 +1740,7 @@ crl::time PeerListContent::paintRow( }); p.fillRect(0, 0, outerWidth, _rowHeight, bg); - row->paintRipple(p, 0, 0, outerWidth); + row->paintRipple(p, st, 0, 0, outerWidth); row->paintUserpic( p, st, diff --git a/Telegram/SourceFiles/boxes/peer_list_box.h b/Telegram/SourceFiles/boxes/peer_list_box.h index e4a00d9393..335001e02c 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.h +++ b/Telegram/SourceFiles/boxes/peer_list_box.h @@ -230,7 +230,12 @@ public: QPoint point, UpdateCallback &&updateCallback); void stopLastRipple(); - void paintRipple(Painter &p, int x, int y, int outerWidth); + void paintRipple( + Painter &p, + const style::PeerListItem &st, + int x, + int y, + int outerWidth); void paintUserpic( Painter &p, const style::PeerListItem &st,