From db9b44a71af5c1c9689af23d4b556a5ff53ce3dc Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Mon, 4 Feb 2019 15:30:53 -0800 Subject: [PATCH] QmlMarketplace - The QML Text object has sufficient markup to handle all of our needs, so use that instead of webengineview --- .../commerce/marketplace/MarketplaceItem.qml | 62 ++++--------------- 1 file changed, 11 insertions(+), 51 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml b/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml index 3d5b1c3bc8..303a193d92 100644 --- a/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml +++ b/interface/resources/qml/hifi/commerce/marketplace/MarketplaceItem.qml @@ -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(""+model.text+""); - 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}); } } }