Commit 3efad800 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Quick and dirty image viewer

parent 8ffab8fd
......@@ -42,5 +42,15 @@ DelegateAbstractMessageContent {
fileItem: (self.photoSizeItem ? self.photoSizeItem.photo : null);
autoDownload: true;
Container.forcedHeight: (self.photoSizeItem ? self.photoSizeItem.height * width / self.photoSizeItem.width : 1);
MouseArea {
visible: img.valid;
anchors.fill: parent;
onClicked: {
compoImgViewer.createObject (window, {
"source" : img.url,
});
}
}
}
}
......@@ -2,6 +2,7 @@ import QtQuick 2.6;
import QtMultimedia 5.6;
import QtQmlTricks 3.0;
import Sailfish.Silica 1.0;
import Sailfish.Gallery 1.0;
import Qt.labs.folderlistmodel 2.1;
import QtDocGallery 5.0;
import QtFeedback 5.0;
......@@ -944,4 +945,30 @@ ApplicationWindow {
Component { id: compoMsgCall; DelegateMessageCall { } }
Component { id: compoMsgChatChangePhoto; DelegateMessageChatChangePhoto { } }
Component { id: compoMsgUnsupported; DelegateMessageUnsupported { } }
Component {
id: compoImgViewer;
TouchBlocker {
id: blocker;
anchors.fill: parent;
property alias source : imgViewer.source;
Rectangle {
color: Helpers.panelColor;
anchors.fill: parent;
}
ImageViewer {
id: imgViewer;
source: "";
active: true;
anchors.fill: parent;
onClicked: {
blocker.destroy ();
}
property var root : window; // NOTE : to avoid QML warnings because it' baldy coded...
}
}
}
}
......@@ -14,7 +14,7 @@ Name: harbour-telegrame
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: A native Telegram client for Sailfish OS
Version: 0.9
Release: 15
Release: 16
Group: Qt/Qt
License: WTFPL
URL: http://gitlab.unique-conception.org/sailfish-app/telegra-me
......
Name: harbour-telegrame
Summary: A native Telegram client for Sailfish OS
Version: 0.9
Release: 15
Release: 16
Group: Qt/Qt
URL: http://gitlab.unique-conception.org/sailfish-app/telegra-me
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment