mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Show speed control in media viewer only when supported
This commit is contained in:
@@ -362,7 +362,7 @@ void PlaybackControls::showMenu() {
|
|||||||
|
|
||||||
_menu.emplace(this, _menuStyle);
|
_menu.emplace(this, _menuStyle);
|
||||||
|
|
||||||
{
|
if (Media::Audio::SupportsSpeedControl()) {
|
||||||
auto speedItem = base::make_unique_q<MenuSpeedItem>(
|
auto speedItem = base::make_unique_q<MenuSpeedItem>(
|
||||||
_menu,
|
_menu,
|
||||||
_menuStyle.menu,
|
_menuStyle.menu,
|
||||||
@@ -372,10 +372,9 @@ void PlaybackControls::showMenu() {
|
|||||||
updatePlaybackSpeed(speed);
|
updatePlaybackSpeed(speed);
|
||||||
}, speedItem->lifetime());
|
}, speedItem->lifetime());
|
||||||
_menu->addAction(std::move(speedItem));
|
_menu->addAction(std::move(speedItem));
|
||||||
|
_menu->addSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
_menu->addSeparator();
|
|
||||||
|
|
||||||
_menu->addAction(tr::lng_mediaview_rotate_video(tr::now), [=] {
|
_menu->addAction(tr::lng_mediaview_rotate_video(tr::now), [=] {
|
||||||
_delegate->playbackControlsRotate();
|
_delegate->playbackControlsRotate();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user