Slightly improved style of voice record bar.
BIN
Telegram/Resources/icons/voice_lock/audio_once_bg.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
Telegram/Resources/icons/voice_lock/audio_once_bg@2x.png
Normal file
After Width: | Height: | Size: 895 B |
BIN
Telegram/Resources/icons/voice_lock/audio_once_bg@3x.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/voice_lock/audio_once_number.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
Telegram/Resources/icons/voice_lock/audio_once_number@2x.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
Telegram/Resources/icons/voice_lock/audio_once_number@3x.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
Telegram/Resources/icons/voice_lock/recorded_delete.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
Telegram/Resources/icons/voice_lock/recorded_delete@2x.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/voice_lock/recorded_delete@3x.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
|
@ -1063,12 +1063,17 @@ historyRecordVoiceShowDuration: 120;
|
|||
historyRecordVoiceDuration: 120;
|
||||
historyRecordVoice: icon {{ "chat/input_record", historyRecordVoiceFg }};
|
||||
historyRecordVoiceOver: icon {{ "chat/input_record", historyRecordVoiceFgOver }};
|
||||
historyRecordVoiceOnceBg: icon {{ "voice_lock/audio_once_bg", historySendIconFg }};
|
||||
historyRecordVoiceOnceBgOver: icon {{ "voice_lock/audio_once_bg", historySendIconFgOver }};
|
||||
historyRecordVoiceOnceFg: icon {{ "voice_lock/audio_once_number", windowFgActive }};
|
||||
historyRecordVoiceOnceFgOver: icon {{ "voice_lock/audio_once_number", windowFgActive }};
|
||||
historyRecordVoiceOnceInactive: icon {{ "chat/audio_once", windowSubTextFg }};
|
||||
historyRecordVoiceActive: icon {{ "chat/input_record_filled", historyRecordVoiceFgActiveIcon }};
|
||||
historyRecordSendIconPosition: point(2px, 0px);
|
||||
historyRecordVoiceRippleBgActive: lightButtonBgOver;
|
||||
historyRecordSignalRadius: 5px;
|
||||
historyRecordCancel: windowSubTextFg;
|
||||
historyRecordCancelActive: windowActiveTextFg;
|
||||
historyRecordCancelActive: historySendIconFg;
|
||||
historyRecordFont: font(13px);
|
||||
historyRecordDurationSkip: 12px;
|
||||
historyRecordDurationFg: historyComposeAreaFg;
|
||||
|
@ -1111,16 +1116,16 @@ historyRecordLockArrow: icon {{ "voice_lock/voice_arrow", historyToDownFg }};
|
|||
historyRecordLockRippleMargin: margins(6px, 6px, 6px, 6px);
|
||||
|
||||
historyRecordDelete: IconButton(historyAttach) {
|
||||
icon: icon {{ "info/info_media_delete", historyComposeIconFg }};
|
||||
iconOver: icon {{ "info/info_media_delete", historyComposeIconFgOver }};
|
||||
icon: icon {{ "voice_lock/recorded_delete", historyComposeIconFg }};
|
||||
iconOver: icon {{ "voice_lock/recorded_delete", historyComposeIconFgOver }};
|
||||
iconPosition: point(10px, 11px);
|
||||
}
|
||||
historyRecordWaveformRightSkip: 10px;
|
||||
historyRecordWaveformBgMargins: margins(5px, 7px, 5px, 7px);
|
||||
historyRecordWaveformBgMargins: margins(5px, 8px, 5px, 9px);
|
||||
|
||||
historyRecordWaveformBar: 3px;
|
||||
|
||||
historyRecordLockPosition: point(1px, 35px);
|
||||
historyRecordLockPosition: point(1px, 22px);
|
||||
|
||||
historyRecordCancelButtonWidth: 100px;
|
||||
historyRecordCancelButtonFg: lightButtonFg;
|
||||
|
|
|
@ -312,49 +312,16 @@ TTLButton::TTLButton(
|
|||
|
||||
Ui::RippleButton::paintRipple(p, _rippleRect.x(), _rippleRect.y());
|
||||
|
||||
const auto innerRect = QRectF(inner)
|
||||
- st::historyRecordLockMargin * 2;
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
|
||||
p.setFont(st::semiboldFont);
|
||||
p.setPen(_st.lock.fg);
|
||||
p.drawText(inner, _text, style::al_center);
|
||||
|
||||
const auto penWidth = st::historyRecordTTLLineWidth;
|
||||
auto pen = QPen(_st.lock.fg);
|
||||
pen.setJoinStyle(Qt::RoundJoin);
|
||||
pen.setCapStyle(Qt::RoundCap);
|
||||
pen.setWidthF(penWidth);
|
||||
|
||||
p.setPen(pen);
|
||||
p.setBrush(Qt::NoBrush);
|
||||
p.drawArc(innerRect, arc::kQuarterLength, arc::kHalfLength);
|
||||
|
||||
{
|
||||
p.setClipRect(innerRect
|
||||
- QMarginsF(
|
||||
innerRect.width() / 2,
|
||||
-penWidth,
|
||||
-penWidth,
|
||||
-penWidth));
|
||||
pen.setStyle(Qt::DotLine);
|
||||
p.setPen(pen);
|
||||
p.drawEllipse(innerRect);
|
||||
p.setClipping(false);
|
||||
}
|
||||
|
||||
const auto activeProgress = _activeAnimation.value(
|
||||
!Ui::AbstractButton::isDisabled() ? 1 : 0);
|
||||
|
||||
p.setOpacity(1. - activeProgress);
|
||||
st::historyRecordVoiceOnceInactive.paintInCenter(p, inner);
|
||||
|
||||
if (activeProgress) {
|
||||
p.setOpacity(activeProgress);
|
||||
pen.setStyle(Qt::SolidLine);
|
||||
pen.setBrush(st::windowBgActive);
|
||||
p.setPen(pen);
|
||||
p.setBrush(pen.brush());
|
||||
p.drawEllipse(innerRect);
|
||||
|
||||
p.setPen(st::windowFgActive);
|
||||
p.drawText(innerRect, _text, style::al_center);
|
||||
st::historyRecordVoiceOnceBg.paintInCenter(p, inner);
|
||||
st::historyRecordVoiceOnceFg.paintInCenter(p, inner);
|
||||
}
|
||||
|
||||
}, lifetime());
|
||||
|
|