Fix image viewer size 0x0 while loading & for GIFs
This commit is contained in:
parent
5a1ca24e65
commit
eebe215a62
|
@ -30,6 +30,12 @@ Image {
|
||||||
readonly property int animatedPaintedHeight:
|
readonly property int animatedPaintedHeight:
|
||||||
animatedLoader.item ? animatedLoader.item.paintedHeight : 0
|
animatedLoader.item ? animatedLoader.item.paintedHeight : 0
|
||||||
|
|
||||||
|
readonly property int animatedImplicitWidth:
|
||||||
|
animatedLoader.item ? animatedLoader.item.implicitWidth : 0
|
||||||
|
|
||||||
|
readonly property int animatedImplicitHeight:
|
||||||
|
animatedLoader.item ? animatedLoader.item.implicitHeight : 0
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
// Can be reimplemented in components inheriting HImage
|
// Can be reimplemented in components inheriting HImage
|
||||||
const oldSource = source
|
const oldSource = source
|
||||||
|
|
|
@ -46,9 +46,17 @@ Rectangle {
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
id: dimensions
|
id: dimensions
|
||||||
text: qsTr("%1 x %2")
|
text:
|
||||||
.arg(viewer.canvas.full.implicitWidth)
|
qsTr("%1 x %2")
|
||||||
.arg(viewer.canvas.full.implicitHeight)
|
.arg(
|
||||||
|
viewer.canvas.full.animatedImplicitWidth ||
|
||||||
|
viewer.canvas.full.implicitWidth ||
|
||||||
|
viewer.overallSize.width
|
||||||
|
).arg(
|
||||||
|
viewer.canvas.full.animatedImplicitHeight ||
|
||||||
|
viewer.canvas.full.implicitHeight ||
|
||||||
|
viewer.overallSize.height
|
||||||
|
)
|
||||||
|
|
||||||
elide: HLabel.ElideRight
|
elide: HLabel.ElideRight
|
||||||
topPadding: theme.spacing / 2
|
topPadding: theme.spacing / 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user