mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Slightly improved progress radial for video messages with ttl.
This commit is contained in:
parent
46ddc7364c
commit
ad6890e7dd
1 changed files with 7 additions and 6 deletions
|
@ -582,18 +582,19 @@ void Gif::draw(Painter &p, const PaintContext &context) const {
|
||||||
const auto value = playback->value();
|
const auto value = playback->value();
|
||||||
if (value > 0.) {
|
if (value > 0.) {
|
||||||
auto pen = st->historyVideoMessageProgressFg()->p;
|
auto pen = st->historyVideoMessageProgressFg()->p;
|
||||||
auto was = p.pen();
|
const auto was = p.pen();
|
||||||
pen.setWidth(st::radialLine);
|
pen.setWidth(st::radialLine);
|
||||||
pen.setCapStyle(Qt::RoundCap);
|
pen.setCapStyle(Qt::RoundCap);
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
p.setOpacity(st::historyVideoMessageProgressOpacity);
|
p.setOpacity(st::historyVideoMessageProgressOpacity);
|
||||||
|
|
||||||
auto from = arc::kQuarterLength;
|
const auto from = arc::kQuarterLength;
|
||||||
auto len = -qRound(arc::kFullLength * value);
|
const auto len = std::round(arc::kFullLength
|
||||||
auto stepInside = st::radialLine / 2;
|
* (inTTLViewer ? (1. - value) : -value));
|
||||||
|
const auto stepInside = st::radialLine / 2;
|
||||||
{
|
{
|
||||||
PainterHighQualityEnabler hq(p);
|
auto hq = PainterHighQualityEnabler(p);
|
||||||
p.drawArc(rthumb.marginsRemoved(QMargins(stepInside, stepInside, stepInside, stepInside)), from, len);
|
p.drawArc(rthumb - Margins(stepInside), from, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
p.setPen(was);
|
p.setPen(was);
|
||||||
|
|
Loading…
Add table
Reference in a new issue