mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi
This commit is contained in:
commit
3dbd181a9f
4 changed files with 22 additions and 16 deletions
|
@ -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]
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue