mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Pause gift view ministars in an inactive window.
This commit is contained in:
parent
2d53ec5d34
commit
522ca3b04a
2 changed files with 5 additions and 1 deletions
|
@ -171,6 +171,9 @@ void ServiceBox::draw(Painter &p, const PaintContext &context) const {
|
|||
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(context.st->msgServiceBg()); // ?
|
||||
if (const auto stars = _button.stars.get()) {
|
||||
stars->setPaused(context.paused);
|
||||
}
|
||||
_button.drawBg(p);
|
||||
p.setPen(context.st->msgServiceFg());
|
||||
if (_button.ripple) {
|
||||
|
|
|
@ -168,7 +168,7 @@ void ButtonPart::draw(
|
|||
int outerWidth) const {
|
||||
PainterHighQualityEnabler hq(p);
|
||||
|
||||
const auto position = QPoint(
|
||||
const auto position = QPoint(
|
||||
(outerWidth - width()) / 2 + _margins.left(),
|
||||
_margins.top());
|
||||
p.translate(position);
|
||||
|
@ -182,6 +182,7 @@ void ButtonPart::draw(
|
|||
auto clipPath = QPainterPath();
|
||||
clipPath.addRoundedRect(r, radius, radius);
|
||||
p.setClipPath(clipPath);
|
||||
_stars.setPaused(context.paused);
|
||||
_stars.paint(p);
|
||||
p.setClipping(false);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue