mirror of
https://github.com/QuasarApp/ViewSolutions.git
synced 2025-04-26 09:44:39 +00:00
fix work of viewPort widget
This commit is contained in:
parent
003d49c9a9
commit
cb5069cb74
@ -15,7 +15,7 @@ Page {
|
||||
id: viewgroundItem
|
||||
|
||||
anchors.right: parent.right
|
||||
// anchors.top: parent.top
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width / 2
|
||||
height: parent.height / 2
|
||||
@ -26,7 +26,6 @@ Page {
|
||||
source: modelData
|
||||
viewground: viewgroundItem
|
||||
|
||||
// height: root.height / 3
|
||||
title: "Test ViewPortPage"
|
||||
text: "Test ViewPortPage. General text and <i>html code</i>"
|
||||
width: viewPort.width
|
||||
|
@ -14,10 +14,11 @@ Page {
|
||||
delegate: Component {
|
||||
ViewPortPage {
|
||||
source: modelData
|
||||
viewground: root
|
||||
viewground: viewPort
|
||||
listView: viewPort
|
||||
width: viewPort.width
|
||||
|
||||
height: root.height / 3
|
||||
contentX: viewPort.contentX
|
||||
contentY: viewPort.contentY
|
||||
title: "Test ViewPortPage"
|
||||
text: "Test ViewPortPage. General text and <i>html code</i>"
|
||||
}
|
||||
|
@ -34,34 +34,20 @@ ViewSolutionsControl {
|
||||
width: (viewPortDelegatW)? viewPortDelegatW: 0
|
||||
height: (viewPortDelegatH)? viewPortDelegatH: 0
|
||||
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
contentY: -(listView.contentY - delegateItem.y + viewground.y)
|
||||
contentX: -(listView.contentX - delegateItem.x + viewground.x)
|
||||
|
||||
onContentXChanged: {
|
||||
console.log(contentX)
|
||||
}
|
||||
contentWidth: 2000//image.width
|
||||
contentHeight: image.height
|
||||
Item {
|
||||
clip: true
|
||||
interactive: false
|
||||
Image {
|
||||
id: image;
|
||||
source: delegateItem.source
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
x:0
|
||||
y:0
|
||||
x:(listView.contentX - delegateItem.x + viewground.x)
|
||||
y:(listView.contentY - delegateItem.y + viewground.y)
|
||||
width: viewground.width;
|
||||
height: viewground.height;
|
||||
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: imageMrgin
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ ViewPortPage {
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.50;
|
||||
color: "#0f"+ baseColor;
|
||||
color: "#ff"+ baseColor;
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
|
@ -35,6 +35,7 @@ ViewPortDelegatBase {
|
||||
border.color: "#" + baseColor
|
||||
border.width: 0
|
||||
radius: height * 0.05
|
||||
|
||||
}
|
||||
|
||||
content: Item {
|
||||
|
Loading…
x
Reference in New Issue
Block a user