Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1037602
Image.qml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
Image.qml
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020-2021 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import
QtQuick
2.15
import
QtQuick
.
Layouts
1.15
import
QtQuick
.
Controls
2.15
import
moe
.
kazv
.
mxc
.
kazv
0.0
as
MK
import
org
.
kde
.
kirigami
2.13
as
Kirigami
import
'..'
as
Kazv
Simple
{
id: upper
property
var
gender:
'neutral'
property
var
body:
event
.
content
.
body
property
var
mxcUri:
event
.
content
.
url
property
var
imageUri:
matrixSdk
.
mxcUriToHttp
(
mxcUri
)
property
var
imageInfo:
event
.
content
.
info
||
{}
property
var
imageWidth:
image
.
implicitWidth
||
imageInfo
.
w
||
1
// lest we divide by 0
property
var
imageHeight:
image
.
implicitHeight
||
imageInfo
.
h
||
1
property
var
innerContentWidth:
upper
.
contentMaxWidth
-
bubble
.
bubbleSpacing
property
var
kazvIO:
MK
.
KazvIO
{
url:
imageUri
manager:
root
.
kazvIOManager
onResult:
{
progressBar
.
visible
=
false
}
}
Kazv
.
Bubble
{
id: bubble
ColumnLayout
{
id: layout
Label
{
Layout.fillWidth:
false
Layout.maximumWidth:
innerContentWidth
wrapMode:
Text
.
Wrap
text:
l10n
.
get
(
'event-message-image-sent'
,
{
gender
,
body
})
}
Image
{
id: image
source:
imageUri
Layout.maximumWidth:
innerContentWidth
Layout.preferredWidth:
imageWidth
Layout.preferredHeight:
imageHeight
/
imageWidth
*
width
fillMode:
Image
.
PreserveAspectFit
Kazv
.
MediaFileMenu
{
kazvIO:
upper
.
kazvIO
progressBar:
progressBar
url:
imageUri
}
}
Kazv
.
ProgressBar
{
id: progressBar
kazvIO:
upper
.
kazvIO
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 14, 7:31 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
166753
Default Alt Text
Image.qml (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment