Removed bezier circle paint when animations are disabled.
This commit is contained in:
parent
c4897cec0a
commit
2035392564
|
@ -571,9 +571,11 @@ void RecordCircle::paint(Painter &p, QColor c) {
|
|||
const auto dt = crl::now() - _lastUpdateTime;
|
||||
_levelValue.update(dt);
|
||||
|
||||
const auto &mainRadius = st::historyRecordLevelMainRadiusAmplitude;
|
||||
const auto radius = (st::historyRecordLevelMainRadius
|
||||
+ st::historyRecordLevelMainRadiusAmplitude * _levelValue.current());
|
||||
+ (anim::Disabled() ? 0 : mainRadius * _levelValue.current()));
|
||||
|
||||
if (!anim::Disabled()) {
|
||||
_majorWave->tick(radius, dt);
|
||||
_minorWave->tick(radius, dt);
|
||||
_lastUpdateTime = crl::now();
|
||||
|
@ -584,6 +586,7 @@ void RecordCircle::paint(Painter &p, QColor c) {
|
|||
p.setOpacity(kOpacityMinor);
|
||||
_minorWave->paint(p, c);
|
||||
p.setOpacity(opacity);
|
||||
}
|
||||
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(c);
|
||||
|
@ -598,7 +601,9 @@ VoiceRecordButton::VoiceRecordButton(
|
|||
_recordAnimationTicked.events()))
|
||||
, _center(st::historyRecordLevelMaxRadius)
|
||||
, _recordingAnimation([=](crl::time now) {
|
||||
if (!anim::Disabled()) {
|
||||
update();
|
||||
}
|
||||
_recordAnimationTicked.fire_copy(now);
|
||||
return true;
|
||||
}) {
|
||||
|
|
Loading…
Reference in New Issue