mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 06:07:45 +00:00
[Improvement] Video controls for GIFs
This commit is contained in:
parent
e5a9e8eb16
commit
f33a8c1d7d
@ -175,6 +175,7 @@
|
|||||||
"ktg_disable_chat_themes": "Disable chat themes",
|
"ktg_disable_chat_themes": "Disable chat themes",
|
||||||
"ktg_settings_remember_compress_images": "Remember compress images",
|
"ktg_settings_remember_compress_images": "Remember compress images",
|
||||||
"ktg_settings_compress_images_default": "Compress images by default",
|
"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_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_in_app_update_disabled": "In-app updater is disabled.",
|
||||||
"ktg_settings_view_profile_on_top": "Show \"View Profile\" first",
|
"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 "media/view/media_view_overlay_widget.h"
|
||||||
|
|
||||||
|
#include "kotato/kotato_lang.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "api/api_attached_stickers.h"
|
#include "api/api_attached_stickers.h"
|
||||||
#include "api/api_peer_photo.h"
|
#include "api/api_peer_photo.h"
|
||||||
@ -1069,8 +1070,8 @@ QSize OverlayWidget::videoSize() const {
|
|||||||
|
|
||||||
bool OverlayWidget::streamingRequiresControls() const {
|
bool OverlayWidget::streamingRequiresControls() const {
|
||||||
return !_stories
|
return !_stories
|
||||||
&& _document
|
&& _document;
|
||||||
&& (!_document->isAnimation() || _document->isVideoMessage());
|
//&& (!_document->isAnimation() || _document->isVideoMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage OverlayWidget::videoFrame() const {
|
QImage OverlayWidget::videoFrame() const {
|
||||||
@ -4225,8 +4226,11 @@ float64 OverlayWidget::playbackControlsCurrentSpeed(bool lastNonDefault) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWidget::switchToPip() {
|
void OverlayWidget::switchToPip() {
|
||||||
|
if (_document == nullptr) {
|
||||||
|
Ui::Toast::Show(_widget, ktr("ktg_pip_not_supported"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
Expects(_streamed != nullptr);
|
Expects(_streamed != nullptr);
|
||||||
Expects(_document != nullptr);
|
|
||||||
|
|
||||||
const auto document = _document;
|
const auto document = _document;
|
||||||
const auto messageId = _message ? _message->fullId() : FullMsgId();
|
const auto messageId = _message ? _message->fullId() : FullMsgId();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user