Reduced block size for voice record lock.
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1,012 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1,010 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4 KiB |
|
@ -851,12 +851,15 @@ void RecordLock::drawProgress(Painter &p) {
|
|||
|
||||
void RecordLock::startLockingAnimation(float64 to) {
|
||||
auto callback = [=](auto value) { setProgress(value); };
|
||||
const auto duration = st::historyRecordVoiceShowDuration;
|
||||
const auto &duration = st::historyRecordVoiceShowDuration;
|
||||
_lockEnderAnimation.start(std::move(callback), 0., to, duration);
|
||||
}
|
||||
|
||||
void RecordLock::requestPaintProgress(float64 progress) {
|
||||
if (isHidden() || isLocked() || _lockEnderAnimation.animating()) {
|
||||
if (isHidden()
|
||||
|| isLocked()
|
||||
|| _lockEnderAnimation.animating()
|
||||
|| (_progress.current() == progress)) {
|
||||
return;
|
||||
}
|
||||
if (!_progress.current() && (progress > .3)) {
|
||||
|
@ -1028,7 +1031,7 @@ void VoiceRecordBar::init() {
|
|||
) | rpl::start_with_next([=](bool show) {
|
||||
const auto to = show ? 1. : 0.;
|
||||
const auto from = show ? 0. : 1.;
|
||||
const auto duration = st::historyRecordLockShowDuration;
|
||||
const auto &duration = st::historyRecordLockShowDuration;
|
||||
_lock->show();
|
||||
auto callback = [=](auto value) {
|
||||
updateLockGeometry();
|
||||
|
@ -1138,7 +1141,7 @@ void VoiceRecordBar::init() {
|
|||
|
||||
void VoiceRecordBar::activeAnimate(bool active) {
|
||||
const auto to = active ? 1. : 0.;
|
||||
const auto duration = st::historyRecordVoiceDuration;
|
||||
const auto &duration = st::historyRecordVoiceDuration;
|
||||
if (_activeAnimation.animating()) {
|
||||
_activeAnimation.change(to, duration);
|
||||
} else {
|
||||
|
@ -1154,7 +1157,7 @@ void VoiceRecordBar::activeAnimate(bool active) {
|
|||
void VoiceRecordBar::visibilityAnimate(bool show, Fn<void()> &&callback) {
|
||||
const auto to = show ? 1. : 0.;
|
||||
const auto from = show ? 0. : 1.;
|
||||
const auto duration = st::historyRecordVoiceShowDuration;
|
||||
const auto &duration = st::historyRecordVoiceShowDuration;
|
||||
auto animationCallback = [=, callback = std::move(callback)](auto value) {
|
||||
if (!_listen) {
|
||||
_level->requestPaintProgress(value);
|
||||
|
|
|
@ -325,6 +325,7 @@ historyScheduledToggle: IconButton(historyAttach) {
|
|||
};
|
||||
iconPosition: point(-1px, -1px);
|
||||
}
|
||||
|
||||
historyRecordVoiceFg: historyComposeIconFg;
|
||||
historyRecordVoiceFgOver: historyComposeIconFgOver;
|
||||
historyRecordVoiceFgInactive: attentionButtonFg;
|
||||
|
@ -350,7 +351,6 @@ historyRecordMinorAmplitudeRadius: 7px;
|
|||
historyRecordRandomAddition: 8px;
|
||||
historyRecordRadiusDiff: 50px;
|
||||
historyRecordRadiusDiffMin: 10px;
|
||||
historyRecordLevelMinRadius: 38px;
|
||||
historyRecordLevelMaxRadius: 70px;
|
||||
|
||||
historyRecordTextStyle: TextStyle(defaultTextStyle) {
|
||||
|
@ -381,7 +381,7 @@ historyRecordLockBodyShadow: icon {{ "voice_lock/record_lock_body_shadow", histo
|
|||
historyRecordLockBody: icon {{ "voice_lock/record_lock_body", historyToDownBg }};
|
||||
historyRecordLockMargin: margins(4px, 4px, 4px, 4px);
|
||||
historyRecordLockArrow: icon {{ "voice_lock/voice_arrow", historyToDownFg }};
|
||||
historyRecordLockRippleMargin: margins(5px, 5px, 5px, 5px);
|
||||
historyRecordLockRippleMargin: margins(6px, 6px, 6px, 6px);
|
||||
|
||||
historyRecordDelete: IconButton(historyAttach) {
|
||||
icon: icon {{ "info_media_delete", historyComposeIconFg }};
|
||||
|
@ -392,7 +392,7 @@ historyRecordWaveformBgMargins: margins(5px, 7px, 5px, 7px);
|
|||
|
||||
historyRecordWaveformBar: 3px;
|
||||
|
||||
historyRecordLockPosition: point(7px, 35px);
|
||||
historyRecordLockPosition: point(1px, 35px);
|
||||
|
||||
historySilentToggle: IconButton(historyBotKeyboardShow) {
|
||||
icon: icon {{ "send_control_silent_off", historyComposeIconFg }};
|
||||
|
|