Slightly improved style of voice record bar.
After Width: | Height: | Size: 496 B |
After Width: | Height: | Size: 895 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 529 B |
After Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -1063,12 +1063,17 @@ historyRecordVoiceShowDuration: 120;
|
||||||
historyRecordVoiceDuration: 120;
|
historyRecordVoiceDuration: 120;
|
||||||
historyRecordVoice: icon {{ "chat/input_record", historyRecordVoiceFg }};
|
historyRecordVoice: icon {{ "chat/input_record", historyRecordVoiceFg }};
|
||||||
historyRecordVoiceOver: icon {{ "chat/input_record", historyRecordVoiceFgOver }};
|
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 }};
|
historyRecordVoiceActive: icon {{ "chat/input_record_filled", historyRecordVoiceFgActiveIcon }};
|
||||||
historyRecordSendIconPosition: point(2px, 0px);
|
historyRecordSendIconPosition: point(2px, 0px);
|
||||||
historyRecordVoiceRippleBgActive: lightButtonBgOver;
|
historyRecordVoiceRippleBgActive: lightButtonBgOver;
|
||||||
historyRecordSignalRadius: 5px;
|
historyRecordSignalRadius: 5px;
|
||||||
historyRecordCancel: windowSubTextFg;
|
historyRecordCancel: windowSubTextFg;
|
||||||
historyRecordCancelActive: windowActiveTextFg;
|
historyRecordCancelActive: historySendIconFg;
|
||||||
historyRecordFont: font(13px);
|
historyRecordFont: font(13px);
|
||||||
historyRecordDurationSkip: 12px;
|
historyRecordDurationSkip: 12px;
|
||||||
historyRecordDurationFg: historyComposeAreaFg;
|
historyRecordDurationFg: historyComposeAreaFg;
|
||||||
|
@ -1111,16 +1116,16 @@ historyRecordLockArrow: icon {{ "voice_lock/voice_arrow", historyToDownFg }};
|
||||||
historyRecordLockRippleMargin: margins(6px, 6px, 6px, 6px);
|
historyRecordLockRippleMargin: margins(6px, 6px, 6px, 6px);
|
||||||
|
|
||||||
historyRecordDelete: IconButton(historyAttach) {
|
historyRecordDelete: IconButton(historyAttach) {
|
||||||
icon: icon {{ "info/info_media_delete", historyComposeIconFg }};
|
icon: icon {{ "voice_lock/recorded_delete", historyComposeIconFg }};
|
||||||
iconOver: icon {{ "info/info_media_delete", historyComposeIconFgOver }};
|
iconOver: icon {{ "voice_lock/recorded_delete", historyComposeIconFgOver }};
|
||||||
iconPosition: point(10px, 11px);
|
iconPosition: point(10px, 11px);
|
||||||
}
|
}
|
||||||
historyRecordWaveformRightSkip: 10px;
|
historyRecordWaveformRightSkip: 10px;
|
||||||
historyRecordWaveformBgMargins: margins(5px, 7px, 5px, 7px);
|
historyRecordWaveformBgMargins: margins(5px, 8px, 5px, 9px);
|
||||||
|
|
||||||
historyRecordWaveformBar: 3px;
|
historyRecordWaveformBar: 3px;
|
||||||
|
|
||||||
historyRecordLockPosition: point(1px, 35px);
|
historyRecordLockPosition: point(1px, 22px);
|
||||||
|
|
||||||
historyRecordCancelButtonWidth: 100px;
|
historyRecordCancelButtonWidth: 100px;
|
||||||
historyRecordCancelButtonFg: lightButtonFg;
|
historyRecordCancelButtonFg: lightButtonFg;
|
||||||
|
|
|
@ -312,49 +312,16 @@ TTLButton::TTLButton(
|
||||||
|
|
||||||
Ui::RippleButton::paintRipple(p, _rippleRect.x(), _rippleRect.y());
|
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(
|
const auto activeProgress = _activeAnimation.value(
|
||||||
!Ui::AbstractButton::isDisabled() ? 1 : 0);
|
!Ui::AbstractButton::isDisabled() ? 1 : 0);
|
||||||
|
|
||||||
|
p.setOpacity(1. - activeProgress);
|
||||||
|
st::historyRecordVoiceOnceInactive.paintInCenter(p, inner);
|
||||||
|
|
||||||
if (activeProgress) {
|
if (activeProgress) {
|
||||||
p.setOpacity(activeProgress);
|
p.setOpacity(activeProgress);
|
||||||
pen.setStyle(Qt::SolidLine);
|
st::historyRecordVoiceOnceBg.paintInCenter(p, inner);
|
||||||
pen.setBrush(st::windowBgActive);
|
st::historyRecordVoiceOnceFg.paintInCenter(p, inner);
|
||||||
p.setPen(pen);
|
|
||||||
p.setBrush(pen.brush());
|
|
||||||
p.drawEllipse(innerRect);
|
|
||||||
|
|
||||||
p.setPen(st::windowFgActive);
|
|
||||||
p.drawText(innerRect, _text, style::al_center);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|