From 4e3cdf6569f682ca32e8fb9082682983cc4761f8 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Apr 2016 12:32:27 +1200 Subject: [PATCH 01/31] Update Running Scripts' search to have rounded ends and a search icon --- .../resources/qml/controls-uit/TextField.qml | 15 ++++++++++++++- .../resources/qml/hifi/dialogs/RunningScripts.qml | 3 ++- .../resources/qml/styles-uit/HifiConstants.qml | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/controls-uit/TextField.qml b/interface/resources/qml/controls-uit/TextField.qml index b0d657652e..c260449428 100644 --- a/interface/resources/qml/controls-uit/TextField.qml +++ b/interface/resources/qml/controls-uit/TextField.qml @@ -20,6 +20,7 @@ TextField { property int colorScheme: hifi.colorSchemes.light readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property bool isSearchField: false property string label: "" property real controlHeight: height + (textFieldLabel.visible ? textFieldLabel.height : 0) @@ -28,6 +29,7 @@ TextField { FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } font.family: firaSansSemiBold.name font.pixelSize: hifi.fontSizes.textFieldInput + font.italic: textField.text == "" height: implicitHeight + 4 // Make surrounding box higher so that highlight is vertically centered. y: textFieldLabel.visible ? textFieldLabel.height + textFieldLabel.anchors.bottomMargin : 0 @@ -42,11 +44,22 @@ TextField { : (textField.focus ? hifi.colors.black : hifi.colors.baseGrayShadow) border.color: hifi.colors.primaryHighlight border.width: textField.focus ? 1 : 0 + radius: isSearchField ? textField.height / 2 : 0 + + HiFiGlyphs { + text: hifi.glyphs.search + color: textColor + size: hifi.fontSizes.textFieldSearchIcon + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: hifi.dimensions.textPadding + visible: isSearchField + } } placeholderTextColor: hifi.colors.lightGray selectedTextColor: hifi.colors.black selectionColor: hifi.colors.primaryHighlight - padding.left: hifi.dimensions.textPadding + padding.left: (isSearchField ? textField.height : 0) + hifi.dimensions.textPadding padding.right: hifi.dimensions.textPadding } diff --git a/interface/resources/qml/hifi/dialogs/RunningScripts.qml b/interface/resources/qml/hifi/dialogs/RunningScripts.qml index 215710cc81..b9fc7f37ab 100644 --- a/interface/resources/qml/hifi/dialogs/RunningScripts.qml +++ b/interface/resources/qml/hifi/dialogs/RunningScripts.qml @@ -175,11 +175,12 @@ Window { HifiControls.TextField { id: filterEdit + isSearchField: true anchors.left: parent.left anchors.right: parent.right focus: true colorScheme: hifi.colorSchemes.dark - placeholderText: "filter" + placeholderText: "Filter" onTextChanged: scriptsModel.filterRegExp = new RegExp("^.*" + text + ".*$", "i") Component.onCompleted: scriptsModel.filterRegExp = new RegExp("^.*$", "i") } diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index 02be3b93d1..c1ba92ed31 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -156,6 +156,7 @@ Item { readonly property real inputLabel: dimensions.largeScreen ? 14 : 10 readonly property real textFieldInput: dimensions.largeScreen ? 15 : 12 readonly property real textFieldInputLabel: dimensions.largeScreen ? 13 : 9 + readonly property real textFieldSearchIcon: dimensions.largeScreen ? 30 : 24 readonly property real tableText: dimensions.largeScreen ? 15 : 12 readonly property real buttonLabel: dimensions.largeScreen ? 13 : 9 readonly property real iconButton: dimensions.largeScreen ? 13 : 9 From 3f62702ff02c0ab69ee2c6417bd8ff9b4f96e845 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Apr 2016 13:38:00 +1200 Subject: [PATCH 02/31] Add search icon to entity list filter --- examples/html/edit-style.css | 16 ++++++++++++++++ examples/html/entityList.html | 2 +- .../resources/qml/controls-uit/TextField.qml | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/examples/html/edit-style.css b/examples/html/edit-style.css index 02a3ba3cab..c8ed9fe7da 100644 --- a/examples/html/edit-style.css +++ b/examples/html/edit-style.css @@ -360,6 +360,22 @@ input[type=checkbox]:checked + label:hover { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEySURBVDhPnZLPSsNAEMa/XVPBCE0RhNy0OarP4Av4AD6JB0GwVBA8efBBxHsgh4CQswcRoUIpiIpVAm3zZ5M4szFSbQPBH3xkJvNNZskOer2eLIriKM/ze1JOcS1UHmdZduF5ngEKjr/fN4Z6+oKerwA2gxC4HAFPEWVLsAzgZAvYt3Q6Enw6jg7uBAaTFMNwhpnKdbXCkAJdy8ROu4XrXW2HTJIErHcFDD6nC02Mom8PwymeE2gvS0ZRBBaTlsOXEmdlrfLLOI7Bakrl/zWxCT8T/904f9QW/b06qtrCUdtFCqdjYs2Q2jAPX8c2XQd7Kr/wfV8vwIPs4Ga1ixe5Xrr/YFLTYfKIvWzM6ZtwXZdX7lxXG0L+sxXHcW5t254opRzawQ0S72+dPmjTroIgOP0CQSMt5LDn1T8AAAAASUVORK5CYII=); } +.icon-input input { + position: relative; + padding-left: 36px; +} +.icon-input span { + position: absolute; + left: 6px; + top: -2px; + font-family: hifi-glyphs; + font-size: 30px; + color: #afafaf; +} +.icon-input input:focus + span { + color: #ffffff; +} + .selectable { -webkit-touch-callout: text; -webkit-user-select: text; diff --git a/examples/html/entityList.html b/examples/html/entityList.html index 532b18bb97..ebb9d3bad5 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -286,7 +286,7 @@
- + Y m
diff --git a/interface/resources/qml/controls-uit/TextField.qml b/interface/resources/qml/controls-uit/TextField.qml index c260449428..6cf88c43c3 100644 --- a/interface/resources/qml/controls-uit/TextField.qml +++ b/interface/resources/qml/controls-uit/TextField.qml @@ -52,14 +52,14 @@ TextField { size: hifi.fontSizes.textFieldSearchIcon anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: hifi.dimensions.textPadding + anchors.leftMargin: hifi.dimensions.textPadding - 2 visible: isSearchField } } placeholderTextColor: hifi.colors.lightGray selectedTextColor: hifi.colors.black selectionColor: hifi.colors.primaryHighlight - padding.left: (isSearchField ? textField.height : 0) + hifi.dimensions.textPadding + padding.left: (isSearchField ? textField.height - 2 : 0) + hifi.dimensions.textPadding padding.right: hifi.dimensions.textPadding } From 9c9da1cab96458ccac7f038a8041bef4a630f269 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Apr 2016 13:38:12 +1200 Subject: [PATCH 03/31] Make entity list filter have rounded focus highlight --- examples/html/edit-style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/html/edit-style.css b/examples/html/edit-style.css index c8ed9fe7da..c9650120fa 100644 --- a/examples/html/edit-style.css +++ b/examples/html/edit-style.css @@ -218,6 +218,12 @@ input.search { border-radius: 14px; } +input.search:focus { + outline: none; + box-sizing: border-box; + box-shadow: 0 0 0px 1px #00b4ef; +} + input:disabled, textarea:disabled { background-color: #383838; color: #afafaf; From 8bfd028906ee45e0246a67c7b7cfbccafe1eccc4 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Apr 2016 15:28:19 +1200 Subject: [PATCH 04/31] Add units to field labels --- examples/html/edit-style.css | 21 +++++++-------- examples/html/entityProperties.html | 40 ++++++++++++++--------------- examples/html/gridControls.html | 18 +++++-------- 3 files changed, 37 insertions(+), 42 deletions(-) diff --git a/examples/html/edit-style.css b/examples/html/edit-style.css index c9650120fa..e96e8f9630 100644 --- a/examples/html/edit-style.css +++ b/examples/html/edit-style.css @@ -474,12 +474,17 @@ input[type=checkbox]:checked + label:hover { min-height: 29px; } -.property label { +.property label, .number label { display: table-cell; vertical-align: middle; font-family: Raleway-SemiBold; font-size: 14px; } +.property label .unit, .number label .unit { + margin-left: 8px; + font-family: Raleway-Light; + font-size: 13px; +} .value { display: block; @@ -512,7 +517,8 @@ input[type=checkbox]:checked + label:hover { .text label, .url label, .number label, .textarea label, .rgb label, .xyz label, .pyr label, .dropdown label, .gen label { float: left; - margin-bottom: 4px; + margin-left: 1px; + margin-bottom: 3px; } .number > input { @@ -527,13 +533,6 @@ input[type=checkbox]:checked + label:hover { clear: both; } -.unit { - padding-left: 4px; - vertical-align: top; - position: relative; - top: 5px; -} - .dropdown { position: relative; margin-bottom: -17px; @@ -768,7 +767,7 @@ textarea:enabled[scrolling="true"]::-webkit-resizer { #entity-list-header { - margin-bottom: 24px; + margin-bottom: 36px; } #delete { @@ -793,6 +792,8 @@ textarea:enabled[scrolling="true"]::-webkit-resizer { #radius-and-unit { float: right; margin-right: -148px; + position: relative; + top: -20px; } diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html index bd8abb9a91..2302dde055 100644 --- a/examples/html/entityProperties.html +++ b/examples/html/entityProperties.html @@ -1336,7 +1336,7 @@ M
- +
@@ -1357,7 +1357,7 @@
- +
@@ -1365,7 +1365,7 @@
- +
@@ -1373,7 +1373,7 @@
- +
@@ -1381,7 +1381,7 @@
- +
@@ -1413,7 +1413,7 @@
- +
@@ -1426,7 +1426,7 @@ M
- +
@@ -1438,7 +1438,7 @@
- +
@@ -1457,7 +1457,7 @@
- +
@@ -1465,7 +1465,7 @@
- +
@@ -1551,7 +1551,7 @@
- +
@@ -1635,7 +1635,7 @@
- +
@@ -1684,8 +1684,8 @@
-
-
+
+
@@ -1704,9 +1704,9 @@
-
-
-
+
+
+
@@ -1716,8 +1716,8 @@
-
-
+
+
@@ -1777,7 +1777,7 @@
-
+
diff --git a/examples/html/gridControls.html b/examples/html/gridControls.html index 7b1be72bdc..cb71f49ef2 100644 --- a/examples/html/gridControls.html +++ b/examples/html/gridControls.html @@ -146,24 +146,18 @@
- - - m - + +
- - - m - + +
- - - m - + +
From 353292413342f89261ea5bd13769fdecf87380a9 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Apr 2016 15:28:38 +1200 Subject: [PATCH 05/31] Add search radius label --- examples/html/entityList.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index ebb9d3bad5..04ba309cb0 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -287,7 +287,10 @@
Y - m +
+ + +
From abdc994f073746755f8310986b92878f7c3f54a9 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 8 Apr 2016 12:46:06 +1200 Subject: [PATCH 06/31] Replace grid color presets with color picker plus RGB fields --- examples/html/edit-style.css | 8 --- examples/html/gridControls.html | 86 +++++++++++++++++++++------------ examples/libraries/gridTool.js | 23 ++------- 3 files changed, 60 insertions(+), 57 deletions(-) diff --git a/examples/html/edit-style.css b/examples/html/edit-style.css index e96e8f9630..d4f7f7b16a 100644 --- a/examples/html/edit-style.css +++ b/examples/html/edit-style.css @@ -896,11 +896,3 @@ input#dimension-rescale-button { min-width: 50px; margin-left: 6px; } - - -.color-set label, .color-set span { - display: block; -} -.color-set span { - padding-top: 2px; -} diff --git a/examples/html/gridControls.html b/examples/html/gridControls.html index cb71f49ef2..f56be6400e 100644 --- a/examples/html/gridControls.html +++ b/examples/html/gridControls.html @@ -11,21 +11,14 @@ + + +