mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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
|
||||
}
|
||||
|
||||
//RalewaySemiBold {
|
||||
// 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;
|
||||
RalewaySemiBold {
|
||||
id: descriptionText
|
||||
|
||||
anchors.top: descriptionLabel.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
model: descriptionTextModel
|
||||
interactive: false
|
||||
anchors.topMargin: 5
|
||||
width: parent.width
|
||||
|
||||
delegate: Component {
|
||||
Rectangle {
|
||||
id: descriptionWebRect
|
||||
width: parent.width
|
||||
height: 5
|
||||
WebEngineView {
|
||||
id: descriptionWebView
|
||||
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});
|
||||
}
|
||||
}
|
||||
}
|
||||
text: root.description
|
||||
size: 14
|
||||
color: hifi.colors.lightGray
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.Wrap
|
||||
onLinkActivated: {
|
||||
sendToScript({method: 'marketplace_open_link', link: link});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue