/
erhoof
/
telegraf
Обзор
Документация
Войти
/
erhoof
/
telegraf
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
qml/components/messageContent/MessageVideo.qml
57 строк
2 KB
mbarashkov
Улучшили отображение видео...
18 сен 2025, 13:58
18 сен 2025, 13:58
e347b53
Код
Авторство
О чём код?
import QtQuick 2.6 import Sailfish.Silica 1.0 import QtMultimedia 5.6 import "../" MessageContentBase { id: messageContent property var videoData: rawMessage.content['@type'] === "messageVideo" ? rawMessage.content.video : rawMessage.content.video_note onClicked: { pageStack.push(Qt.resolvedUrl("../../pages/VideoComponentPage.qml"), { "videoData": videoData, "shouldPlay": true }); } Item { anchors.fill: parent clip: true TDLibThumbnail { id: tdLibImage width: parent.width //don't use anchors here for easier custom scaling height: parent.height thumbnail: videoData.thumbnail minithumbnail: videoData.minithumbnail } Rectangle { anchors { fill: videoIcon leftMargin: -Theme.paddingSmall topMargin: -Theme.paddingSmall bottomMargin: -Theme.paddingSmall rightMargin: -Theme.paddingLarge } radius: Theme.paddingSmall color: Theme.rgba(Theme.overlayBackgroundColor, 0.4) } Icon { id: videoIcon source: "image://theme/icon-m-video" width: Theme.iconSizeSmall height: Theme.iconSizeSmall highlighted: parent.highlighted anchors { right: parent.right rightMargin: Theme.paddingSmall bottom: parent.bottom } } } }