From 313e3e7b6d8f7a6a362a790decd663ec978bfa47 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Sat, 15 Oct 2016 18:18:24 -0700 Subject: [PATCH 1/4] git rid of wacky scaling --- interface/resources/qml/AddressBarDialog.qml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index d5a37d1a21..ebb29fd513 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -29,7 +29,6 @@ Window { destroyOnHidden: false resizable: false pinnable: false; - scale: 1.25 // Make this dialog a little larger than normal width: addressBarDialog.implicitWidth height: addressBarDialog.implicitHeight @@ -74,7 +73,7 @@ Window { property bool punctuationMode: false implicitWidth: backgroundImage.width - implicitHeight: backgroundImage.height + keyboardHeight + cardHeight - 25; // fudge to make header reasonable + implicitHeight: backgroundImage.height + keyboardHeight + cardHeight; // The buttons have their button state changed on hover, so we have to manually fix them up here onBackEnabledChanged: backArrow.buttonState = addressBarDialog.backEnabled ? 1 : 0; @@ -131,13 +130,12 @@ Window { Image { id: backgroundImage source: "../images/address-bar.svg" - width: 576 * root.scale - height: 80 * root.scale + width: 720 + height: 100 anchors { verticalCenter: parent.verticalCenter; - verticalCenterOffset: -15; // fudge to keep header reasonable and keep us under Card } - property int inputAreaHeight: 56.0 * root.scale // Height of the background's input area + property int inputAreaHeight: 70 property int inputAreaStep: (height - inputAreaHeight) / 2 ToolbarButton { @@ -184,7 +182,7 @@ Window { HifiStyles.RalewayLight { id: notice; - font.pixelSize: hifi.fonts.pixelSize * root.scale * 0.50; + font.pixelSize: hifi.fonts.pixelSize * 0.50; anchors { top: parent.top topMargin: parent.inputAreaStep + 12 @@ -213,7 +211,7 @@ Window { topMargin: parent.inputAreaStep + (2 * hifi.layout.spacing) bottomMargin: parent.inputAreaStep } - font.pixelSize: hifi.fonts.pixelSize * root.scale * 0.75 + font.pixelSize: hifi.fonts.pixelSize * 0.75 cursorVisible: false onTextChanged: { filterChoicesByText(); @@ -262,7 +260,6 @@ Window { Window { width: 938 height: 625 - scale: 0.8 // Reset scale of Window to 1.0 (counteract address bar's scale value of 1.25) HifiControls.WebView { anchors.fill: parent; id: storyCardHTML; From 0d2bd23874f128e5c9fa4cb76407ff750a9479a7 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Tue, 18 Oct 2016 09:38:55 -0700 Subject: [PATCH 2/4] cleanup --- interface/resources/qml/AddressBarDialog.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index 7cb1caf5c0..e2db51d9d8 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -77,7 +77,7 @@ Window { property bool punctuationMode: false implicitWidth: backgroundImage.width - implicitHeight: backgroundImage.height + (keyboardEnabled ? keyboard.raisedHeight : keyboardHeight) + cardHeight; + implicitHeight: backgroundImage.height + (keyboardEnabled ? keyboard.height : 0) + cardHeight; // The buttons have their button state changed on hover, so we have to manually fix them up here onBackEnabledChanged: backArrow.buttonState = addressBarDialog.backEnabled ? 1 : 0; @@ -96,7 +96,7 @@ Window { spacing: hifi.layout.spacing; clip: true; anchors { - top: parent.top + bottom: backgroundImage.top horizontalCenter: backgroundImage.horizontalCenter } model: suggestions; @@ -131,6 +131,7 @@ Window { verticalCenter: scroll.verticalCenter; } } + Image { id: backgroundImage source: "../images/address-bar.svg" From ecd84bf23d2e669d547cbde4a1086717fbb178d2 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Tue, 18 Oct 2016 10:05:39 -0700 Subject: [PATCH 3/4] desktop vertical --- interface/resources/qml/AddressBarDialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index e2db51d9d8..f2af980010 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -138,7 +138,7 @@ Window { width: 720 height: 100 anchors { - verticalCenter: parent.verticalCenter; + bottom: parent.keyboardEnabled ? keyboard.top : parent.bottom; } property int inputAreaHeight: 70 property int inputAreaStep: (height - inputAreaHeight) / 2 @@ -286,7 +286,7 @@ Window { raised: parent.keyboardEnabled // Ignore keyboardRaised; keep keyboard raised if enabled (i.e., in HMD). numeric: parent.punctuationMode anchors { - top: backgroundImage.bottom + bottom: parent.bottom left: parent.left right: parent.right } From 36951c3c9599c431f4617dfe46cf13b0eb75519b Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Wed, 19 Oct 2016 11:24:21 -0700 Subject: [PATCH 4/4] colors --- interface/resources/qml/AddressBarDialog.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index 7c54a6a626..941099b7cc 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -21,6 +21,7 @@ import "controls-uit" as HifiControls Window { id: root HifiConstants { id: hifi } + HifiStyles.HifiConstants { id: hifiStyleConstants } objectName: "AddressBarDialog" title: "Go To" @@ -430,10 +431,10 @@ Window { function updateLocationText(enteringAddress) { if (enteringAddress) { notice.text = "Go to a place, @user, path or network address"; - notice.color = "gray"; + notice.color = hifiStyleConstants.colors.baseGrayHighlight; } else { notice.text = AddressManager.isConnected ? "Your location:" : "Not Connected"; - notice.color = AddressManager.isConnected ? "gray" : "crimson"; + notice.color = AddressManager.isConnected ? hifiStyleConstants.colors.baseGrayHighlight : hifiStyleConstants.colors.redHighlight; // Display hostname, which includes ip address, localhost, and other non-placenames. location.text = (AddressManager.hostname || '') + (AddressManager.pathname ? AddressManager.pathname.match(/\/[^\/]+/)[0] : ''); }