ZaStoGram_desktop/Telegram/SourceFiles/iv/markdown/iv_markdown_article_paint.h
John Preston b660c65fdd Fixed selecting captions in scrolled Details padding.
Task: 2026/10/17/make-scrolled-details-captions-selectable-in-the-body-padding
2026-10-20 17:07:51 +04:00

42 lines
1.2 KiB
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "iv/markdown/iv_markdown_article_selection.h"
class QColor;
namespace Iv::Markdown {
struct MarkdownArticlePaintContext;
[[nodiscard]] QRect HorizontalOverflowContentClip(
const LaidOutBlock &block,
const style::Markdown &st,
QRect viewport);
[[nodiscard]] std::optional<QRect> ChildrenPaintClip(
const LaidOutBlock &block);
[[nodiscard]] std::optional<QRect> DescendantPaintClip(
const LaidOutBlock &ancestor,
const LaidOutBlock *block,
QRect clip);
[[nodiscard]] QColor NonPullquoteQuoteCaptionColor(
const MarkdownArticlePaintContext &context,
const style::Markdown &st);
void PaintBlocks(
Painter &p,
const std::vector<LaidOutBlock> &blocks,
std::vector<PreparedFormulaSlot> *formulas,
std::vector<RenderedFormula> *renderedFormulas,
MathRenderer *renderer,
int devicePixelRatio,
int outerWidth,
const style::Markdown &st,
const MarkdownArticlePaintContext &context);
} // namespace Iv::Markdown