mirror of
https://github.com/muesli/telephant
synced 2024-11-22 19:33:06 +00:00
27 lines
649 B
QML
27 lines
649 B
QML
import QtQuick 2.4
|
|
import QtQuick.Controls 2.1
|
|
import QtQuick.Controls.Material 2.1
|
|
import QtQuick.Layouts 1.3
|
|
|
|
Popup {
|
|
property var url
|
|
|
|
id: popup
|
|
|
|
modal: true
|
|
focus: true
|
|
height: image.height + 16
|
|
width: image.width + 16
|
|
anchors.centerIn: mainWindow.overlay
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
|
|
|
Image {
|
|
id: image
|
|
height: Math.min(sourceSize.height, mainWindow.height * 0.8)
|
|
width: Math.min(sourceSize.width, mainWindow.width * 0.8)
|
|
anchors.centerIn: parent
|
|
smooth: true
|
|
fillMode: Image.PreserveAspectFit
|
|
source: url
|
|
}
|
|
}
|