mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix resize loop of images in reply popup
This commit is contained in:
parent
0ade72e970
commit
3319e0ec20
2 changed files with 5 additions and 3 deletions
|
@ -14,6 +14,8 @@ Item {
|
||||||
property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive
|
property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive
|
||||||
property int avatarSize: 40
|
property int avatarSize: 40
|
||||||
|
|
||||||
|
id: timelineRoot
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: colors.window
|
color: colors.window
|
||||||
|
|
|
@ -6,10 +6,10 @@ Item {
|
||||||
property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width)
|
property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width)
|
||||||
property double tempHeight: tempWidth * model.data.proportionalHeight
|
property double tempHeight: tempWidth * model.data.proportionalHeight
|
||||||
|
|
||||||
property bool tooHigh: tempHeight > chat.height - 40
|
property bool tooHigh: tempHeight > timelineRoot.height / 2
|
||||||
|
|
||||||
height: tooHigh ? chat.height - 40 : tempHeight
|
height: tooHigh ? timelineRoot.height / 2 : tempHeight
|
||||||
width: tooHigh ? (chat.height - 40) / model.data.proportionalHeight : tempWidth
|
width: tooHigh ? (timelineRoot.height / 2) / model.data.proportionalHeight : tempWidth
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: img
|
id: img
|
||||||
|
|
Loading…
Reference in a new issue