mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Animate child topics list open / close.
This commit is contained in:
@@ -186,17 +186,18 @@ int PaintBadges(
|
||||
return (initial - right);
|
||||
}
|
||||
|
||||
void PaintExpandedTopicsBar(QPainter &p) {
|
||||
void PaintExpandedTopicsBar(QPainter &p, float64 progress) {
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
const auto radius = st::roundRadiusLarge;
|
||||
const auto width = st::forumDialogRow.padding.left() / 2;
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(st::dialogsBgActive);
|
||||
p.drawRoundedRect(
|
||||
-3 * radius,
|
||||
st::forumDialogRow.padding.top(),
|
||||
3 * radius + width,
|
||||
st::forumDialogRow.photoSize,
|
||||
QRectF(
|
||||
-3. * radius - width * (1. - progress),
|
||||
st::forumDialogRow.padding.top(),
|
||||
3. * radius + width,
|
||||
st::forumDialogRow.photoSize),
|
||||
radius,
|
||||
radius);
|
||||
}
|
||||
@@ -349,13 +350,13 @@ void PaintRow(
|
||||
}
|
||||
|
||||
auto nameleft = context.st->nameLeft;
|
||||
if (context.topicsExpanded > 0.) {
|
||||
PaintExpandedTopicsBar(p, context.topicsExpanded);
|
||||
}
|
||||
if (context.narrow) {
|
||||
if (!draft && item && !item->isEmpty()) {
|
||||
PaintNarrowCounter(p, context, badgesState);
|
||||
}
|
||||
if (context.topicsExpanded) {
|
||||
PaintExpandedTopicsBar(p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user