[Improvement] Video controls for GIFs
This commit is contained in:
parent
1ba8b61bf9
commit
34dddff858
2 changed files with 8 additions and 3 deletions
|
|
@ -175,6 +175,7 @@
|
|||
"ktg_disable_chat_themes": "Disable chat themes",
|
||||
"ktg_settings_remember_compress_images": "Remember compress images",
|
||||
"ktg_settings_compress_images_default": "Compress images by default",
|
||||
"ktg_pip_not_supported": "Sorry, Picture-in-Picture mode is not supported here.",
|
||||
"ktg_forward_quiz_unquoted": "Sorry, quizzes that are currently open and unvoted on cannot be forwarded unquoted.",
|
||||
"ktg_in_app_update_disabled": "In-app updater is disabled.",
|
||||
"ktg_settings_view_profile_on_top": "Show \"View Profile\" first",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "media/view/media_view_overlay_widget.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "apiwrap.h"
|
||||
#include "api/api_attached_stickers.h"
|
||||
#include "api/api_peer_photo.h"
|
||||
|
|
@ -1069,8 +1070,8 @@ QSize OverlayWidget::videoSize() const {
|
|||
|
||||
bool OverlayWidget::streamingRequiresControls() const {
|
||||
return !_stories
|
||||
&& _document
|
||||
&& (!_document->isAnimation() || _document->isVideoMessage());
|
||||
&& _document;
|
||||
//&& (!_document->isAnimation() || _document->isVideoMessage());
|
||||
}
|
||||
|
||||
QImage OverlayWidget::videoFrame() const {
|
||||
|
|
@ -4225,8 +4226,11 @@ float64 OverlayWidget::playbackControlsCurrentSpeed(bool lastNonDefault) {
|
|||
}
|
||||
|
||||
void OverlayWidget::switchToPip() {
|
||||
if (_document == nullptr) {
|
||||
Ui::Toast::Show(_widget, ktr("ktg_pip_not_supported"));
|
||||
return;
|
||||
}
|
||||
Expects(_streamed != nullptr);
|
||||
Expects(_document != nullptr);
|
||||
|
||||
const auto document = _document;
|
||||
const auto messageId = _message ? _message->fullId() : FullMsgId();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue