mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix glitches in search results.
This commit is contained in:
parent
6abfdd20fa
commit
a8106aa38d
4 changed files with 15 additions and 3 deletions
|
@ -637,6 +637,7 @@ auto ChooseTopicBoxController::Row::generatePaintUserpicCallback(
|
|||
p.translate(x, y);
|
||||
_topic->paintUserpic(p, view, {
|
||||
.st = &st::forumTopicRow,
|
||||
.currentBg = st::windowBg,
|
||||
.now = crl::now(),
|
||||
.width = outerWidth,
|
||||
.paused = false,
|
||||
|
|
|
@ -778,6 +778,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
|||
: _peerSearchSelected));
|
||||
paintPeerSearchResult(p, result.get(), {
|
||||
.st = &st::defaultDialogRow,
|
||||
.currentBg = currentBg(),
|
||||
.now = ms,
|
||||
.width = fullWidth,
|
||||
.active = active,
|
||||
|
@ -792,6 +793,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
|||
if (_searchInChat || _searchFromPeer) {
|
||||
paintSearchInChat(p, {
|
||||
.st = &st::forumTopicRow,
|
||||
.currentBg = currentBg(),
|
||||
.now = ms,
|
||||
.width = fullWidth,
|
||||
.paused = videoPaused,
|
||||
|
@ -848,6 +850,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
|||
.st = _st,
|
||||
.folder = _openedFolder,
|
||||
.forum = _openedForum,
|
||||
.currentBg = currentBg(),
|
||||
.filter = _filterId,
|
||||
.now = ms,
|
||||
.width = fullWidth,
|
||||
|
|
|
@ -799,6 +799,13 @@ void PaintUnreadBadge(QPainter &p, const QRect &rect, const UnreadBadgeStyle &st
|
|||
|
||||
} // namespace
|
||||
|
||||
const style::icon *ChatTypeIcon(not_null<PeerData*> peer) {
|
||||
return ChatTypeIcon(peer, {
|
||||
.st = &st::defaultDialogRow,
|
||||
.currentBg = st::windowBg,
|
||||
});
|
||||
}
|
||||
|
||||
const style::icon *ChatTypeIcon(
|
||||
not_null<PeerData*> peer,
|
||||
const PaintContext &context) {
|
||||
|
|
|
@ -57,7 +57,7 @@ struct PaintContext {
|
|||
TopicJumpCache *topicJumpCache = nullptr;
|
||||
Data::Folder *folder = nullptr;
|
||||
Data::Forum *forum = nullptr;
|
||||
QBrush currentBg;
|
||||
required<QBrush> currentBg;
|
||||
FilterId filter = 0;
|
||||
float64 topicsExpanded = 0.;
|
||||
crl::time now = 0;
|
||||
|
@ -71,9 +71,10 @@ struct PaintContext {
|
|||
bool displayUnreadInfo = false;
|
||||
};
|
||||
|
||||
const style::icon *ChatTypeIcon(
|
||||
[[nodiscard]] const style::icon *ChatTypeIcon(
|
||||
not_null<PeerData*> peer,
|
||||
const PaintContext &context = { .st = &st::defaultDialogRow });
|
||||
const PaintContext &context);
|
||||
[[nodiscard]] const style::icon *ChatTypeIcon(not_null<PeerData*> peer);
|
||||
|
||||
class RowPainter {
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue