mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
feat: allow seeking voice and round video messages
fix: increase seek bar height
This commit is contained in:
parent
dc6cd45f50
commit
1fc63407e5
2 changed files with 8 additions and 8 deletions
|
@ -279,8 +279,8 @@ mediaPlayerClose: IconButton(mediaPlayerRepeatButton) {
|
|||
}
|
||||
}
|
||||
mediaPlayerPlayback: FilledSlider {
|
||||
fullWidth: 6px;
|
||||
lineWidth: 2px;
|
||||
fullWidth: 8px;
|
||||
lineWidth: 4px;
|
||||
activeFg: mediaPlayerActiveFg;
|
||||
inactiveFg: mediaPlayerInactiveFg;
|
||||
disabledFg: mediaPlayerDisabledFg;
|
||||
|
|
|
@ -92,15 +92,15 @@ Widget::Widget(
|
|||
_playbackSlider->setValue(value);
|
||||
});
|
||||
_playbackSlider->setChangeProgressCallback([=](float64 value) {
|
||||
if (_type != AudioMsgId::Type::Song) {
|
||||
return; // Round video seek is not supported for now :(
|
||||
if (_type != AudioMsgId::Type::Song && _type != AudioMsgId::Type::Voice) {
|
||||
return;
|
||||
}
|
||||
_playbackProgress->setValue(value, false);
|
||||
handleSeekProgress(value);
|
||||
});
|
||||
_playbackSlider->setChangeFinishedCallback([=](float64 value) {
|
||||
if (_type != AudioMsgId::Type::Song) {
|
||||
return; // Round video seek is not supported for now :(
|
||||
if (_type != AudioMsgId::Type::Song && _type != AudioMsgId::Type::Voice) {
|
||||
return;
|
||||
}
|
||||
_playbackProgress->setValue(value, false);
|
||||
handleSeekFinished(value);
|
||||
|
@ -265,7 +265,7 @@ void Widget::setShadowGeometryToLeft(int x, int y, int w, int h) {
|
|||
|
||||
void Widget::showShadowAndDropdowns() {
|
||||
_shadow->show();
|
||||
_playbackSlider->setVisible(_type == AudioMsgId::Type::Song);
|
||||
_playbackSlider->setVisible(_type == AudioMsgId::Type::Song || _type == AudioMsgId::Type::Voice);
|
||||
if (_volumeHidden) {
|
||||
_volumeHidden = false;
|
||||
_volume->show();
|
||||
|
@ -574,7 +574,7 @@ void Widget::updateControlsVisibility() {
|
|||
_orderToggle->setVisible(_type == AudioMsgId::Type::Song);
|
||||
_speedToggle->setVisible(hasPlaybackSpeedControl());
|
||||
if (!_shadow->isHidden()) {
|
||||
_playbackSlider->setVisible(_type == AudioMsgId::Type::Song);
|
||||
_playbackSlider->setVisible(_type == AudioMsgId::Type::Song || _type == AudioMsgId::Type::Voice);
|
||||
}
|
||||
updateControlsGeometry();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue