MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / PaintRow

Function PaintRow

Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp:400–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399template <typename PaintItemCallback>
400void PaintRow(
401 Painter &p,
402 not_null<const BasicRow*> row,
403 QRect geometry,
404 not_null<Entry*> entry,
405 VideoUserpic *videoUserpic,
406 PeerData *from,
407 PeerBadge &rowBadge,
408 Fn<void()> customEmojiRepaint,
409 const Text::String &rowName,
410 const HiddenSenderInfo *hiddenSenderInfo,
411 HistoryItem *item,
412 const Data::Draft *draft,
413 TimeId date,
414 const PaintContext &context,
415 const FakeRow *fakeRow,
416 BadgesState badgesState,
417 base::flags<Flag> flags,
418 PaintItemCallback &&paintItemCallback) {
419 const auto supportMode = entry->session().supportMode();
420 if (supportMode) {
421 draft = nullptr;
422 }
423
424 const auto history = entry->asHistory();
425 const auto thread = entry->asThread();
426 const auto sublist = entry->asSublist();
427
428 auto bg = context.active
429 ? st::dialogsBgActive
430 : context.selected
431 ? st::dialogsBgOver
432 : context.currentBg;
433 auto swipeTranslation = 0;
434 if (history
435 && context.quickActionContext
436 && !context.quickActionContext->ripple
437 && (history->peer->id.value
438 == context.quickActionContext->data.msgBareId)) {
439 if (context.quickActionContext->data.translation != 0) {
440 swipeTranslation = context.quickActionContext->data.translation
441 * -2;
442 }
443 }
444 if (swipeTranslation) {
445 p.translate(-swipeTranslation, 0);
446 }
447 p.fillRect(geometry, bg);
448 if (!(flags & Flag::TopicJumpRipple)) {
449 auto ripple = context.active
450 ? st::dialogsRippleBgActive
451 : st::dialogsRippleBg;
452 row->paintRipple(p, 0, 0, context.width, &ripple->c);
453 }
454
455 if (flags & Flag::SavedMessages) {
456 EmptyUserpic::PaintSavedMessages(
457 p,

Callers 1

PaintMethod · 0.85

Calls 15

PaintUserpicFunction · 0.85
PaintExpandedTopicsBarFunction · 0.85
PaintNarrowCounterFunction · 0.85
GetNonDefaultValueFunction · 0.85
PaintRowTopRightFunction · 0.85
ChatTypeIconFunction · 0.85
PaintWideCounterFunction · 0.85
PaintFolderEntryTextFunction · 0.85
OnFunction · 0.85
PaintDialogDateFunction · 0.85
PaintRightButtonFunction · 0.85
ShowSendActionInDialogsFunction · 0.85

Tested by

no test coverage detected