From f307f1d97ab8aa4ee87c0866879c41b285389403 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 18 Jun 2018 10:19:00 -0700 Subject: [PATCH 1/4] Fix MS15545: Fix PAL/GoTo WebView's Back Button --- interface/resources/qml/controls/TabletWebView.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/controls/TabletWebView.qml b/interface/resources/qml/controls/TabletWebView.qml index 477422cfa1..bc958aa876 100644 --- a/interface/resources/qml/controls/TabletWebView.qml +++ b/interface/resources/qml/controls/TabletWebView.qml @@ -11,7 +11,6 @@ Item { height: parent !== null ? parent.height : undefined property var parentStackItem: null property int headerHeight: 70 - property string url property string scriptURL property bool keyboardEnabled: false property bool keyboardRaised: false @@ -23,6 +22,7 @@ Item { property bool punctuationMode: false property bool passwordField: false property bool isDesktop: false + property alias url: web.url property alias webView: web.webViewCore property alias profile: web.webViewCoreProfile property bool remove: false @@ -81,7 +81,7 @@ Item { color: hifi.colors.baseGray font.pixelSize: 12 verticalAlignment: Text.AlignLeft - text: root.url + text: web.url anchors { top: nav.bottom horizontalCenter: parent.horizontalCenter; @@ -131,11 +131,11 @@ Item { function loadUrl(url) { web.webViewCore.url = url - root.url = web.webViewCore.url; } - onUrlChanged: { - loadUrl(url); + Rectangle { + anchors.fill: web; + color: hifi.colors.white; } FlickableWebViewCore { From ad1da3e225336c49285a33c385fa158140672b33 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 18 Jun 2018 14:26:46 -0700 Subject: [PATCH 2/4] Fix MS16012: Correct the criteria used to determine empty txn history --- .../resources/qml/hifi/commerce/wallet/WalletHome.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml index 4cf6db7889..2a6ddfddfb 100644 --- a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml +++ b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml @@ -253,8 +253,12 @@ Item { anchors.left: parent.left; anchors.right: parent.right; - Item { // On empty history. We don't want to flash and then replace, so don't show until we know we're zero. - visible: transactionHistoryModel.count === 0 && transactionHistoryModel.currentPageToRetrieve < 0; + Item { + // On empty history. We don't want to flash and then replace, so don't show until we know we should. + // The history is empty when it contains 1 item (the pending item count) AND there are no pending items. + visible: transactionHistoryModel.count === 1 && + transactionHistoryModel.retrievedAtLeastOnePage && + transactionHistoryModel.get(0).count === 0; anchors.centerIn: parent; width: parent.width - 12; height: parent.height; From d056fa6c93dee993d932aeaf1aa94365bc8e73b7 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 19 Jun 2018 09:56:24 -0700 Subject: [PATCH 3/4] Fix MS15154: Remove focused button color --- interface/resources/qml/controls-uit/Button.qml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/interface/resources/qml/controls-uit/Button.qml b/interface/resources/qml/controls-uit/Button.qml index 0119d76ac2..8d0f513021 100644 --- a/interface/resources/qml/controls-uit/Button.qml +++ b/interface/resources/qml/controls-uit/Button.qml @@ -62,8 +62,6 @@ Original.Button { hifi.buttons.pressedColor[control.color] } else if (control.hovered) { hifi.buttons.hoveredColor[control.color] - } else if (!control.hovered && control.focus) { - hifi.buttons.focusedColor[control.color] } else { hifi.buttons.colorStart[control.color] } @@ -78,8 +76,6 @@ Original.Button { hifi.buttons.pressedColor[control.color] } else if (control.hovered) { hifi.buttons.hoveredColor[control.color] - } else if (!control.hovered && control.focus) { - hifi.buttons.focusedColor[control.color] } else { hifi.buttons.colorFinish[control.color] } From 3ef41664dc4e5d18d5e7288f50cd3dad9ac60d7f Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 19 Jun 2018 10:32:01 -0700 Subject: [PATCH 4/4] Implement MS16052: Use quality '50' when saving PNG Snapshots --- interface/src/ui/Snapshot.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/interface/src/ui/Snapshot.cpp b/interface/src/ui/Snapshot.cpp index 8c759ea998..efcc85b23e 100644 --- a/interface/src/ui/Snapshot.cpp +++ b/interface/src/ui/Snapshot.cpp @@ -365,15 +365,23 @@ QFile* Snapshot::savedFileForSnapshot(QImage& shot, // DON'T append ".jpg" to the filename. QT will save the image in the format associated with the // filename's suffix. // If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`. + // For PNGs, we use a "quality" of "50". The output image quality is the same as "100" + // is the same as "0" -- the difference lies in the amount of compression applied to the PNG, + // which slightly affects the time it takes to save the image. // Otherwise, ".jpg" is appended to the user's requested filename so that the image is saved in JPG format. // If the user hasn't supplied a specific filename for the snapshot: - // Save the snapshot in JPG format according to FILENAME_PATH_FORMAT + // Save the snapshot in JPG format at "100" quality according to FILENAME_PATH_FORMAT + int imageQuality = 100; QString filename; if (!userSelectedFilename.isNull()) { QFileInfo snapshotFileInfo(userSelectedFilename); QString userSelectedFilenameSuffix = snapshotFileInfo.suffix(); + userSelectedFilenameSuffix = userSelectedFilenameSuffix.toLower(); if (SUPPORTED_IMAGE_FORMATS.contains(userSelectedFilenameSuffix)) { filename = userSelectedFilename; + if (userSelectedFilenameSuffix == "png") { + imageQuality = 50; + } } else { filename = userSelectedFilename + ".jpg"; } @@ -381,8 +389,6 @@ QFile* Snapshot::savedFileForSnapshot(QImage& shot, filename = FILENAME_PATH_FORMAT.arg(username, now.toString(DATETIME_FORMAT)); } - const int IMAGE_QUALITY = 100; - if (!isTemporary) { // If user has requested specific path then use it, else use the application value QString snapshotFullPath; @@ -432,7 +438,7 @@ QFile* Snapshot::savedFileForSnapshot(QImage& shot, imageFile = new QFile(snapshotFullPath); } - shot.save(imageFile, 0, IMAGE_QUALITY); + shot.save(imageFile, 0, imageQuality); imageFile->close(); return imageFile; @@ -447,7 +453,7 @@ QFile* Snapshot::savedFileForSnapshot(QImage& shot, } imageTempFile->setAutoRemove(isTemporary); - shot.save(imageTempFile, 0, IMAGE_QUALITY); + shot.save(imageTempFile, 0, imageQuality); imageTempFile->close(); return imageTempFile;