mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix some minor UI issues with ImageOverlay and RawMessageDialog
This commit is contained in:
parent
8d52c17f29
commit
53c73c2195
2 changed files with 26 additions and 23 deletions
|
@ -44,6 +44,7 @@ Window {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
smooth: true
|
smooth: true
|
||||||
mipmap: true
|
mipmap: true
|
||||||
|
property bool loaded: status == Image.Ready
|
||||||
}
|
}
|
||||||
|
|
||||||
MxcAnimatedImage {
|
MxcAnimatedImage {
|
||||||
|
@ -57,30 +58,30 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
BoundaryRule on scale {
|
BoundaryRule on scale {
|
||||||
enabled: img.loaded
|
enabled: img.loaded || mxcimage.loaded
|
||||||
id: sbr
|
id: sbr
|
||||||
minimum: 0.1
|
minimum: 0.1
|
||||||
maximum: 100
|
maximum: 10
|
||||||
minimumOvershoot: 0.02; maximumOvershoot: 100
|
minimumOvershoot: 0.02; maximumOvershoot: 10.02
|
||||||
}
|
}
|
||||||
|
|
||||||
//BoundaryRule on x {
|
BoundaryRule on x {
|
||||||
// enabled: img.loaded
|
enabled: img.loaded || mxcimage.loaded
|
||||||
// id: xbr
|
id: xbr
|
||||||
// minimum: -100
|
minimum: -100
|
||||||
// maximum: imageOverlay.width - img.width + 100
|
maximum: imageOverlay.width - img.width + 100
|
||||||
// minimumOvershoot: 100; maximumOvershoot: 100
|
minimumOvershoot: 100; maximumOvershoot: 100
|
||||||
// overshootFilter: BoundaryRule.Peak
|
overshootFilter: BoundaryRule.Peak
|
||||||
//}
|
}
|
||||||
|
|
||||||
//BoundaryRule on y {
|
BoundaryRule on y {
|
||||||
// enabled: img.loaded
|
enabled: img.loaded || mxcimage.loaded
|
||||||
// id: ybr
|
id: ybr
|
||||||
// minimum: -100
|
minimum: -100
|
||||||
// maximum: imageOverlay.height - img.height + 100
|
maximum: imageOverlay.height - img.height + 100
|
||||||
// minimumOvershoot: 100; maximumOvershoot: 100
|
minimumOvershoot: 100; maximumOvershoot: 100
|
||||||
// overshootFilter: BoundaryRule.Peak
|
overshootFilter: BoundaryRule.Peak
|
||||||
//}
|
}
|
||||||
|
|
||||||
PinchHandler {
|
PinchHandler {
|
||||||
onActiveChanged: if (!active) sbr.returnToBounds();
|
onActiveChanged: if (!active) sbr.returnToBounds();
|
||||||
|
@ -92,10 +93,10 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
DragHandler {
|
DragHandler {
|
||||||
//onActiveChanged: if (!active) {
|
onActiveChanged: if (!active) {
|
||||||
// xbr.returnToBounds();
|
xbr.returnToBounds();
|
||||||
// ybr.returnToBounds();
|
ybr.returnToBounds();
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
|
|
@ -38,6 +38,8 @@ ApplicationWindow {
|
||||||
readOnly: true
|
readOnly: true
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Nheko.colors.base
|
color: Nheko.colors.base
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue