mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
QmlMarketplace - The QML Text object has sufficient markup to handle
all of our needs, so use that instead of webengineview
This commit is contained in:
parent
78aa1783a0
commit
db9b44a71a
1 changed files with 11 additions and 51 deletions
|
@ -556,61 +556,21 @@ Rectangle {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
//RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
// id: descriptionText
|
id: descriptionText
|
||||||
//
|
|
||||||
// anchors.top: descriptionLabel.bottom
|
|
||||||
// anchors.left: parent.left
|
|
||||||
// anchors.topMargin: 5
|
|
||||||
// width: parent.width
|
|
||||||
//
|
|
||||||
// text: root.description
|
|
||||||
// size: 14
|
|
||||||
// color: hifi.colors.lightGray
|
|
||||||
// verticalAlignment: Text.AlignVCenter
|
|
||||||
// wrapMode: Text.Wrap
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
ListModel {
|
|
||||||
id: descriptionTextModel
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: descriptionTextView;
|
|
||||||
|
|
||||||
anchors.top: descriptionLabel.bottom
|
anchors.top: descriptionLabel.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.topMargin: 5
|
||||||
|
width: parent.width
|
||||||
model: descriptionTextModel
|
|
||||||
interactive: false
|
|
||||||
|
|
||||||
delegate: Component {
|
text: root.description
|
||||||
Rectangle {
|
size: 14
|
||||||
id: descriptionWebRect
|
color: hifi.colors.lightGray
|
||||||
width: parent.width
|
verticalAlignment: Text.AlignVCenter
|
||||||
height: 5
|
wrapMode: Text.Wrap
|
||||||
WebEngineView {
|
onLinkActivated: {
|
||||||
id: descriptionWebView
|
sendToScript({method: 'marketplace_open_link', link: link});
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
descriptionWebView.enabled = false;
|
|
||||||
loadHtml("<html><head><style>body { overflow: hidden; color: #393939; font-family: Arial !important;}</style></head><body>"+model.text+"</body></html>");
|
|
||||||
descriptionWebView.enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onContentsSizeChanged: {
|
|
||||||
descriptionWebRect.height = contentsSize.height;
|
|
||||||
descriptionTextView.height = contentsSize.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
onNewViewRequested: function(request) {
|
|
||||||
sendToScript({method: 'marketplace_open_link', link: request.requestedUrl});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue