mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
p.translate(x, y);
|
||||||
_topic->paintUserpic(p, view, {
|
_topic->paintUserpic(p, view, {
|
||||||
.st = &st::forumTopicRow,
|
.st = &st::forumTopicRow,
|
||||||
|
.currentBg = st::windowBg,
|
||||||
.now = crl::now(),
|
.now = crl::now(),
|
||||||
.width = outerWidth,
|
.width = outerWidth,
|
||||||
.paused = false,
|
.paused = false,
|
||||||
|
|
|
@ -778,6 +778,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||||
: _peerSearchSelected));
|
: _peerSearchSelected));
|
||||||
paintPeerSearchResult(p, result.get(), {
|
paintPeerSearchResult(p, result.get(), {
|
||||||
.st = &st::defaultDialogRow,
|
.st = &st::defaultDialogRow,
|
||||||
|
.currentBg = currentBg(),
|
||||||
.now = ms,
|
.now = ms,
|
||||||
.width = fullWidth,
|
.width = fullWidth,
|
||||||
.active = active,
|
.active = active,
|
||||||
|
@ -792,6 +793,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||||
if (_searchInChat || _searchFromPeer) {
|
if (_searchInChat || _searchFromPeer) {
|
||||||
paintSearchInChat(p, {
|
paintSearchInChat(p, {
|
||||||
.st = &st::forumTopicRow,
|
.st = &st::forumTopicRow,
|
||||||
|
.currentBg = currentBg(),
|
||||||
.now = ms,
|
.now = ms,
|
||||||
.width = fullWidth,
|
.width = fullWidth,
|
||||||
.paused = videoPaused,
|
.paused = videoPaused,
|
||||||
|
@ -848,6 +850,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||||
.st = _st,
|
.st = _st,
|
||||||
.folder = _openedFolder,
|
.folder = _openedFolder,
|
||||||
.forum = _openedForum,
|
.forum = _openedForum,
|
||||||
|
.currentBg = currentBg(),
|
||||||
.filter = _filterId,
|
.filter = _filterId,
|
||||||
.now = ms,
|
.now = ms,
|
||||||
.width = fullWidth,
|
.width = fullWidth,
|
||||||
|
|
|
@ -799,6 +799,13 @@ void PaintUnreadBadge(QPainter &p, const QRect &rect, const UnreadBadgeStyle &st
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
const style::icon *ChatTypeIcon(not_null<PeerData*> peer) {
|
||||||
|
return ChatTypeIcon(peer, {
|
||||||
|
.st = &st::defaultDialogRow,
|
||||||
|
.currentBg = st::windowBg,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const style::icon *ChatTypeIcon(
|
const style::icon *ChatTypeIcon(
|
||||||
not_null<PeerData*> peer,
|
not_null<PeerData*> peer,
|
||||||
const PaintContext &context) {
|
const PaintContext &context) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct PaintContext {
|
||||||
TopicJumpCache *topicJumpCache = nullptr;
|
TopicJumpCache *topicJumpCache = nullptr;
|
||||||
Data::Folder *folder = nullptr;
|
Data::Folder *folder = nullptr;
|
||||||
Data::Forum *forum = nullptr;
|
Data::Forum *forum = nullptr;
|
||||||
QBrush currentBg;
|
required<QBrush> currentBg;
|
||||||
FilterId filter = 0;
|
FilterId filter = 0;
|
||||||
float64 topicsExpanded = 0.;
|
float64 topicsExpanded = 0.;
|
||||||
crl::time now = 0;
|
crl::time now = 0;
|
||||||
|
@ -71,9 +71,10 @@ struct PaintContext {
|
||||||
bool displayUnreadInfo = false;
|
bool displayUnreadInfo = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const style::icon *ChatTypeIcon(
|
[[nodiscard]] const style::icon *ChatTypeIcon(
|
||||||
not_null<PeerData*> peer,
|
not_null<PeerData*> peer,
|
||||||
const PaintContext &context = { .st = &st::defaultDialogRow });
|
const PaintContext &context);
|
||||||
|
[[nodiscard]] const style::icon *ChatTypeIcon(not_null<PeerData*> peer);
|
||||||
|
|
||||||
class RowPainter {
|
class RowPainter {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Reference in a new issue