From 988d8a1a62811a48652ce1eaa137dba69e2f15c8 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 6 Oct 2017 18:17:48 -0700 Subject: [PATCH 01/10] TRying to debug the overlay notifications to show ?) --- interface/src/ui/overlays/Billboard3DOverlay.cpp | 8 ++++++++ interface/src/ui/overlays/Billboard3DOverlay.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/interface/src/ui/overlays/Billboard3DOverlay.cpp b/interface/src/ui/overlays/Billboard3DOverlay.cpp index 960f0de095..f19426b054 100644 --- a/interface/src/ui/overlays/Billboard3DOverlay.cpp +++ b/interface/src/ui/overlays/Billboard3DOverlay.cpp @@ -37,6 +37,14 @@ QVariant Billboard3DOverlay::getProperty(const QString &property) { return Planar3DOverlay::getProperty(property); } +void Billboard3DOverlay::update(float duration) { + // Billboard's transform needs to constantly be adjusted if it faces the avatar + // if (isFacingAvatar()) { + notifyRenderTransformChange(); + // } + Base3DOverlay::update(duration); +} + bool Billboard3DOverlay::applyTransformTo(Transform& transform, bool force) { bool transformChanged = false; if (force || usecTimestampNow() > _transformExpiry) { diff --git a/interface/src/ui/overlays/Billboard3DOverlay.h b/interface/src/ui/overlays/Billboard3DOverlay.h index 6b3aa40451..6f590dd6ec 100644 --- a/interface/src/ui/overlays/Billboard3DOverlay.h +++ b/interface/src/ui/overlays/Billboard3DOverlay.h @@ -26,6 +26,8 @@ public: void setProperties(const QVariantMap& properties) override; QVariant getProperty(const QString& property) override; + void update(float deltatime) override; + protected: virtual bool applyTransformTo(Transform& transform, bool force = false) override; From 480047548d5e76a0ccd6e9fe3142b36322b5011a Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 11 Oct 2017 18:04:29 -0700 Subject: [PATCH 02/10] exposing the Render interface to the overlay web3d --- interface/src/ui/overlays/Web3DOverlay.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/src/ui/overlays/Web3DOverlay.cpp b/interface/src/ui/overlays/Web3DOverlay.cpp index 526890b9c1..8f9f84642f 100644 --- a/interface/src/ui/overlays/Web3DOverlay.cpp +++ b/interface/src/ui/overlays/Web3DOverlay.cpp @@ -245,6 +245,7 @@ void Web3DOverlay::setupQmlSurface() { _webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get().data()); _webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance()); _webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance()); + _webSurface->getSurfaceContext()->setContextProperty("Render", AbstractViewStateInterface::instance()->getRenderEngine()->getConfiguration().get()); _webSurface->getSurfaceContext()->setContextProperty("pathToFonts", "../../"); From 8994200d0115fb471de62e9d3c68b6958a2b48a4 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 12 Oct 2017 17:57:30 -0700 Subject: [PATCH 03/10] Trying to integrate the tool scripts as an app --- .../src/EntityTreeRenderer.cpp | 6 +- .../utilities/lib/configprop/ConfigSlider.qml | 72 ++++ .../lib/hifi-qml/controls-uit/Button.qml | 73 ++++ .../lib/hifi-qml/controls-uit/CheckBox.qml | 101 +++++ .../lib/hifi-qml/controls-uit/ComboBox.qml | 249 +++++++++++ .../hifi-qml/controls-uit/ConfigSlider.qml | 72 ++++ .../hifi-qml/controls-uit/ContentSection.qml | 138 ++++++ .../lib/hifi-qml/controls-uit/GlyphButton.qml | 78 ++++ .../hifi-qml/controls-uit/HorizontalRule.qml | 20 + .../controls-uit/HorizontalSpacer.qml | 21 + .../lib/hifi-qml/controls-uit/Label.qml | 22 + .../hifi-qml/controls-uit/QueuedButton.qml | 43 ++ .../lib/hifi-qml/controls-uit/RadioButton.qml | 71 +++ .../lib/hifi-qml/controls-uit/Separator.qml | 38 ++ .../lib/hifi-qml/controls-uit/Slider.qml | 98 +++++ .../lib/hifi-qml/controls-uit/SpinBox.qml | 117 +++++ .../lib/hifi-qml/controls-uit/Switch.qml | 156 +++++++ .../lib/hifi-qml/controls-uit/Table.qml | 179 ++++++++ .../hifi-qml/controls-uit/VerticalSpacer.qml | 21 + .../styles-uit/AnonymousProRegular.qml | 23 + .../lib/hifi-qml/styles-uit/ButtonLabel.qml | 18 + .../hifi-qml/styles-uit/FiraSansRegular.qml | 23 + .../hifi-qml/styles-uit/FiraSansSemiBold.qml | 23 + .../hifi-qml/styles-uit/FiraSansSemiBold.qmlc | Bin 0 -> 4097 bytes .../lib/hifi-qml/styles-uit/HiFiGlyphs.qml | 25 ++ .../lib/hifi-qml/styles-uit/HiFiGlyphs.qmlc | Bin 0 -> 4897 bytes .../lib/hifi-qml/styles-uit/HifiConstants.qml | 342 +++++++++++++++ .../hifi-qml/styles-uit/HifiConstants.qmlc | Bin 0 -> 51320 bytes .../lib/hifi-qml/styles-uit/IconButton.qml | 20 + .../lib/hifi-qml/styles-uit/InfoItem.qml | 19 + .../lib/hifi-qml/styles-uit/InputLabel.qml | 18 + .../lib/hifi-qml/styles-uit/ListItem.qml | 18 + .../lib/hifi-qml/styles-uit/Logs.qml | 18 + .../lib/hifi-qml/styles-uit/OverlayTitle.qml | 18 + .../lib/hifi-qml/styles-uit/RalewayBold.qml | 24 ++ .../lib/hifi-qml/styles-uit/RalewayLight.qml | 23 + .../hifi-qml/styles-uit/RalewayRegular.qml | 23 + .../hifi-qml/styles-uit/RalewaySemiBold.qml | 23 + .../hifi-qml/styles-uit/RalewaySemiBold.qmlc | Bin 0 -> 4081 bytes .../lib/hifi-qml/styles-uit/SectionName.qml | 19 + .../lib/hifi-qml/styles-uit/Separator.qml | 41 ++ .../lib/hifi-qml/styles-uit/Separator.qmlc | Bin 0 -> 6855 bytes .../lib/hifi-qml/styles-uit/ShortcutText.qml | 18 + .../lib/hifi-qml/styles-uit/TabName.qml | 19 + .../hifi-qml/styles-uit/TextFieldInput.qml | 18 + .../utilities/render/deferredLighting.qml | 405 ++++++++++-------- scripts/developer/utilities/render/luci.js | 98 +++++ 47 files changed, 2663 insertions(+), 188 deletions(-) create mode 100644 scripts/developer/utilities/lib/configprop/ConfigSlider.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qmlc create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/IconButton.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/InfoItem.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/InputLabel.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ListItem.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Logs.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/OverlayTitle.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayBold.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayLight.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayRegular.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qmlc create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/SectionName.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qmlc create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml create mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml create mode 100644 scripts/developer/utilities/render/luci.js diff --git a/libraries/entities-renderer/src/EntityTreeRenderer.cpp b/libraries/entities-renderer/src/EntityTreeRenderer.cpp index 9e700b0efe..92a82908e2 100644 --- a/libraries/entities-renderer/src/EntityTreeRenderer.cpp +++ b/libraries/entities-renderer/src/EntityTreeRenderer.cpp @@ -72,7 +72,11 @@ EntityRendererPointer EntityTreeRenderer::renderableForEntityId(const EntityItem render::ItemID EntityTreeRenderer::renderableIdForEntityId(const EntityItemID& id) const { auto renderable = renderableForEntityId(id); - return renderable ? renderable->getRenderItemID() : render::Item::INVALID_ITEM_ID; + if (renderable) { + return renderable->getRenderItemID(); + } else { + return render::Item::INVALID_ITEM_ID; + } } int EntityTreeRenderer::_entitiesScriptEngineCount = 0; diff --git a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml new file mode 100644 index 0000000000..516193b81c --- /dev/null +++ b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml @@ -0,0 +1,72 @@ +// +// ConfigSlider.qml +// +// Created by Zach Pomerantz on 2/8/2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.7 +import QtQuick.Controls 1.4 +import QtQuick.Layouts 1.3 + +import "../hifi-qml/styles-uit" +import "../hifi-qml/controls-uit" as HifiControls + + +Item { + id: root + width: 400 + height: 24 + property bool integral: false + property var config + property string property + property alias label: labelControl.text + property alias min: sliderControl.minimumValue + property alias max: sliderControl.maximumValue + + Component.onCompleted: { + // Binding favors qml value, so set it first + sliderControl.value = root.config[root.property]; + bindingControl.when = true; + } + + HifiControls.Label { + id: labelControl + text: root.label + anchors.left: root.left + anchors.leftMargin: 8 + anchors.top: root.top + anchors.topMargin: 7 + } + + HifiControls.Label { + id: labelValue + text: sliderControl.value.toFixed(root.integral ? 0 : 2) + anchors.right: root.right + anchors.rightMargin: 8 + anchors.top: root.top + anchors.topMargin: 15 + } + + Binding { + id: bindingControl + target: root.config + property: root.property + value: sliderControl.value + when: false + } + + HifiControls.Slider { + id: sliderControl + stepSize: root.integral ? 1.0 : 0.0 + width: root.width-130 + height: 20 + anchors.right: root.right + anchors.rightMargin: 8 + anchors.top: root.top + anchors.topMargin: 3 + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml new file mode 100644 index 0000000000..59f8a63238 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml @@ -0,0 +1,73 @@ +// +// Button.qml +// +// Created by David Rowe on 16 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" + +Original.Button { + property int color: 0 + property int colorScheme: hifi.colorSchemes.light + + width: 120 + height: hifi.dimensions.controlLineHeight + + HifiConstants { id: hifi } + + style: ButtonStyle { + + background: Rectangle { + radius: hifi.buttons.radius + + gradient: Gradient { + GradientStop { + position: 0.2 + color: { + if (!control.enabled) { + hifi.buttons.disabledColorStart[control.colorScheme] + } else if (control.pressed) { + hifi.buttons.pressedColor[control.color] + } else if (control.hovered) { + hifi.buttons.hoveredColor[control.color] + } else { + hifi.buttons.colorStart[control.color] + } + } + } + GradientStop { + position: 1.0 + color: { + if (!control.enabled) { + hifi.buttons.disabledColorFinish[control.colorScheme] + } else if (control.pressed) { + hifi.buttons.pressedColor[control.color] + } else if (control.hovered) { + hifi.buttons.hoveredColor[control.color] + } else { + hifi.buttons.colorFinish[control.color] + } + } + } + } + } + + label: RalewayBold { + font.capitalization: Font.AllUppercase + color: enabled ? hifi.buttons.textColor[control.color] + : hifi.buttons.disabledTextColor[control.colorScheme] + size: hifi.fontSizes.buttonLabel + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + text: control.text + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml new file mode 100644 index 0000000000..b279b7ca8d --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml @@ -0,0 +1,101 @@ +// +// CheckBox.qml +// +// Created by David Rowe on 26 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" + +Original.CheckBox { + id: checkBox + + property int colorScheme: hifi.colorSchemes.light + property string color: hifi.colors.lightGrayText + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property bool isRedCheck: false + property int boxSize: 14 + property int boxRadius: 3 + property bool wrap: true; + readonly property int checkSize: Math.max(boxSize - 8, 10) + readonly property int checkRadius: 2 + activeFocusOnPress: true + + style: CheckBoxStyle { + indicator: Rectangle { + id: box + width: boxSize + height: boxSize + radius: boxRadius + border.width: 1 + border.color: pressed || hovered + ? hifi.colors.checkboxCheckedBorder + : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) + + gradient: Gradient { + GradientStop { + position: 0.2 + color: pressed || hovered + ? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightStart) + : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart) + } + GradientStop { + position: 1.0 + color: pressed || hovered + ? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightFinish) + : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) + } + } + + Rectangle { + visible: pressed || hovered + anchors.centerIn: parent + id: innerBox + width: checkSize - 4 + height: width + radius: checkRadius + color: hifi.colors.checkboxCheckedBorder + } + + Rectangle { + id: check + width: checkSize + height: checkSize + radius: checkRadius + anchors.centerIn: parent + color: isRedCheck ? hifi.colors.checkboxCheckedRed : hifi.colors.checkboxChecked + border.width: 2 + border.color: isRedCheck? hifi.colors.checkboxCheckedBorderRed : hifi.colors.checkboxCheckedBorder + visible: checked && !pressed || !checked && pressed + } + + Rectangle { + id: disabledOverlay + visible: !enabled + width: boxSize + height: boxSize + radius: boxRadius + border.width: 1 + border.color: hifi.colors.baseGrayHighlight + color: hifi.colors.baseGrayHighlight + opacity: 0.5 + } + } + + label: Label { + text: control.text + color: control.color + x: 2 + wrapMode: checkBox.wrap ? Text.Wrap : Text.NoWrap + elide: checkBox.wrap ? Text.ElideNone : Text.ElideRight + enabled: checkBox.enabled + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml new file mode 100644 index 0000000000..d672fa6387 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml @@ -0,0 +1,249 @@ +// +// ComboBox.qml +// +// Created by Bradley Austin David on 27 Jan 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "../controls-uit" as HifiControls + +FocusScope { + id: root + HifiConstants { id: hifi } + + property alias model: comboBox.model; + property alias editable: comboBox.editable + property alias comboBox: comboBox + readonly property alias currentText: comboBox.currentText; + property alias currentIndex: comboBox.currentIndex; + + property int dropdownHeight: 480 + property int colorScheme: hifi.colorSchemes.light + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property string label: "" + property real controlHeight: height + (comboBoxLabel.visible ? comboBoxLabel.height + comboBoxLabel.anchors.bottomMargin : 0) + + readonly property ComboBox control: comboBox + + property bool isDesktop: true + + signal accepted(); + + implicitHeight: comboBox.height; + focus: true + + Rectangle { + id: background + gradient: Gradient { + GradientStop { + position: 0.2 + color: popup.visible + ? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) + : (isLightColorScheme ? hifi.colors.dropDownLightStart : hifi.colors.dropDownDarkStart) + } + GradientStop { + position: 1.0 + color: popup.visible + ? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) + : (isLightColorScheme ? hifi.colors.dropDownLightFinish : hifi.colors.dropDownDarkFinish) + } + } + anchors.fill: parent + } + + SystemPalette { id: palette } + + ComboBox { + id: comboBox + anchors.fill: parent + visible: false + height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control. + } + + FiraSansSemiBold { + id: textField + anchors { + left: parent.left + leftMargin: hifi.dimensions.textPadding + right: dropIcon.left + verticalCenter: parent.verticalCenter + } + size: hifi.fontSizes.textFieldInput + text: comboBox.currentText + elide: Text.ElideRight + color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText ) + } + + Item { + id: dropIcon + anchors { right: parent.right; verticalCenter: parent.verticalCenter } + height: background.height + width: height + Rectangle { + width: 1 + height: parent.height + anchors.top: parent.top + anchors.left: parent.left + color: isLightColorScheme ? hifi.colors.faintGray : hifi.colors.baseGray + } + HiFiGlyphs { + anchors { + top: parent.top + topMargin: -11 + horizontalCenter: parent.horizontalCenter + } + size: hifi.dimensions.spinnerSize + text: hifi.glyphs.caratDn + color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText) + } + } + + MouseArea { + id: controlHover + hoverEnabled: true + anchors.fill: parent + onClicked: toggleList(); + } + + function toggleList() { + if (popup.visible) { + hideList(); + } else { + showList(); + } + } + + function showList() { + var r; + if (isDesktop) { + r = desktop.mapFromItem(root, 0, 0, root.width, root.height); + } else { + r = mapFromItem(root, 0, 0, root.width, root.height); + } + var y = r.y + r.height; + var bottom = y + scrollView.height; + var height = isDesktop ? desktop.height : tabletRoot.height; + if (bottom > height) { + y -= bottom - height + 8; + } + scrollView.x = r.x; + scrollView.y = y; + popup.visible = true; + popup.forceActiveFocus(); + listView.currentIndex = root.currentIndex; + scrollView.hoverEnabled = true; + } + + function hideList() { + popup.visible = false; + scrollView.hoverEnabled = false; + root.accepted(); + } + + FocusScope { + id: popup + parent: isDesktop ? desktop : root + anchors.fill: parent + z: isDesktop ? desktop.zLevels.menu : 12 + visible: false + focus: true + + MouseArea { + anchors.fill: parent + onClicked: hideList(); + } + + function previousItem() { listView.currentIndex = (listView.currentIndex + listView.count - 1) % listView.count; } + function nextItem() { listView.currentIndex = (listView.currentIndex + listView.count + 1) % listView.count; } + function selectCurrentItem() { root.currentIndex = listView.currentIndex; hideList(); } + function selectSpecificItem(index) { root.currentIndex = index; hideList(); } + + Keys.onUpPressed: previousItem(); + Keys.onDownPressed: nextItem(); + Keys.onSpacePressed: selectCurrentItem(); + Keys.onRightPressed: selectCurrentItem(); + Keys.onReturnPressed: selectCurrentItem(); + Keys.onEscapePressed: hideList(); + + ScrollView { + id: scrollView + height: root.dropdownHeight + width: root.width + 4 + property bool hoverEnabled: false; + + style: ScrollViewStyle { + decrementControl: Item { + visible: false + } + incrementControl: Item { + visible: false + } + scrollBarBackground: Rectangle{ + implicitWidth: 20 + color: hifi.colors.baseGray + } + + handle: + Rectangle { + implicitWidth: 16 + anchors.left: parent.left + anchors.leftMargin: 3 + anchors.top: parent.top + anchors.bottom: parent.bottom + radius: 6 + color: hifi.colors.lightGrayText + } + } + + ListView { + id: listView + height: textField.height * count * 1.4 + model: root.model + delegate: Rectangle { + width: root.width + 4 + height: popupText.implicitHeight * 1.4 + color: (listView.currentIndex === index) ? hifi.colors.primaryHighlight : + (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) + FiraSansSemiBold { + anchors.left: parent.left + anchors.leftMargin: hifi.dimensions.textPadding + anchors.verticalCenter: parent.verticalCenter + id: popupText + text: listView.model[index] ? listView.model[index] : (listView.model.get && listView.model.get(index).text ? listView.model.get(index).text : "") + size: hifi.fontSizes.textFieldInput + color: hifi.colors.baseGray + } + MouseArea { + id: popupHover + anchors.fill: parent; + hoverEnabled: scrollView.hoverEnabled; + onEntered: listView.currentIndex = index; + onClicked: popup.selectSpecificItem(index); + } + } + } + } + } + + HifiControls.Label { + id: comboBoxLabel + text: root.label + colorScheme: root.colorScheme + anchors.left: parent.left + anchors.bottom: parent.top + anchors.bottomMargin: 4 + visible: label != "" + } + + Component.onCompleted: { + isDesktop = (typeof desktop !== "undefined"); + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml new file mode 100644 index 0000000000..9c38b66ed8 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml @@ -0,0 +1,72 @@ +// +// ConfigSlider.qml +// examples/utilities/tools/render +// +// Created by Zach Pomerantz on 2/8/2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "../controls-uit" as HifiControls + +Item { + id: root + width: 400 + height: 24 + property bool integral: false + property var config + property string property + property alias label: labelControl.text + property alias min: sliderControl.minimumValue + property alias max: sliderControl.maximumValue + + Component.onCompleted: { + // Binding favors qml value, so set it first + sliderControl.value = root.config[root.property]; + bindingControl.when = true; + } + + HifiControls.Label { + id: labelControl + text: root.label + anchors.left: root.left + anchors.leftMargin: 8 + anchors.top: root.top + anchors.topMargin: 7 + } + + HifiControls.Label { + id: labelValue + text: sliderControl.value.toFixed(root.integral ? 0 : 2) + anchors.right: root.right + anchors.rightMargin: 8 + anchors.top: root.top + anchors.topMargin: 15 + } + + Binding { + id: bindingControl + target: root.config + property: root.property + value: sliderControl.value + when: false + } + + HifiControls.Slider { + id: sliderControl + stepSize: root.integral ? 1.0 : 0.0 + width: root.width-130 + height: 20 + anchors.right: root.right + anchors.rightMargin: 8 + anchors.top: root.top + anchors.topMargin: 3 + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml new file mode 100644 index 0000000000..47a13e9262 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml @@ -0,0 +1,138 @@ +// +// ContentSection.qml +// +// Created by David Rowe on 16 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtGraphicalEffects 1.0 + +import "../styles-uit" + +Column { + property string name: "Content Section" + property bool isFirst: false + property bool isCollapsible: false // Set at creation. + property bool isCollapsed: false + + spacing: 0 // Defer spacing decisions to individual controls. + + anchors { + left: parent.left + leftMargin: hifi.dimensions.contentMargin.x + right: parent.right + rightMargin: hifi.dimensions.contentMargin.x + } + + function toggleCollapsed() { + if (isCollapsible) { + isCollapsed = !isCollapsed; + for (var i = 1; i < children.length; i++) { + children[i].visible = !isCollapsed; + } + } + } + + Item { + id: sectionName + anchors.left: parent.left + anchors.right: parent.right + height: leadingSpace.height + topBar.height + heading.height + bottomBar.height + + Item { + id: leadingSpace + width: 1 + height: isFirst ? 7 : 0 + anchors.top: parent.top + } + + Item { + id: topBar + visible: !isFirst + height: visible ? 2 : 0 + anchors.top: leadingSpace.bottom + + Rectangle { + id: shadow + width: frame.width + height: 1 + color: hifi.colors.baseGrayShadow + x: -hifi.dimensions.contentMargin.x + } + + Rectangle { + width: frame.width + height: 1 + color: hifi.colors.baseGrayHighlight + x: -hifi.dimensions.contentMargin.x + anchors.top: shadow.bottom + } + } + + Item { + id: heading + anchors { + left: parent.left + right: parent.right + top: topBar.bottom + } + height: isCollapsible ? 36 : 28 + + RalewayRegular { + id: title + anchors { + left: parent.left + top: parent.top + topMargin: 12 + } + size: hifi.fontSizes.sectionName + font.capitalization: Font.AllUppercase + text: name + color: hifi.colors.lightGrayText + } + + HiFiGlyphs { + anchors { + top: title.top + topMargin: -9 + right: parent.right + rightMargin: -4 + } + size: hifi.fontSizes.disclosureButton + text: isCollapsed ? hifi.glyphs.disclosureButtonExpand : hifi.glyphs.disclosureButtonCollapse + color: hifi.colors.lightGrayText + visible: isCollapsible + } + + MouseArea { + // Events are propogated so that any active control is defocused. + anchors.fill: parent + propagateComposedEvents: true + onPressed: { + toggleCollapsed(); + mouse.accepted = false; + } + } + } + + LinearGradient { + id: bottomBar + visible: desktop.gradientsSupported && isCollapsible + width: frame.width + height: visible ? 4 : 0 + x: -hifi.dimensions.contentMargin.x + anchors.top: heading.bottom + start: Qt.point(0, 0) + end: Qt.point(0, 4) + gradient: Gradient { + GradientStop { position: 0.0; color: hifi.colors.darkGray } + GradientStop { position: 1.0; color: hifi.colors.baseGray } // Equivalent of darkGray0 over baseGray background. + } + cached: true + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml new file mode 100644 index 0000000000..ac353b5a52 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml @@ -0,0 +1,78 @@ +// +// GlyphButton.qml +// +// Created by Clement on 3/7/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" + +Original.Button { + property int color: 0 + property int colorScheme: hifi.colorSchemes.light + property string glyph: "" + property int size: 32 + + width: 120 + height: 28 + + style: ButtonStyle { + + background: Rectangle { + radius: hifi.buttons.radius + + gradient: Gradient { + GradientStop { + position: 0.2 + color: { + if (!control.enabled) { + hifi.buttons.disabledColorStart[control.colorScheme] + } else if (control.pressed) { + hifi.buttons.pressedColor[control.color] + } else if (control.hovered) { + hifi.buttons.hoveredColor[control.color] + } else { + hifi.buttons.colorStart[control.color] + } + } + } + GradientStop { + position: 1.0 + color: { + if (!control.enabled) { + hifi.buttons.disabledColorFinish[control.colorScheme] + } else if (control.pressed) { + hifi.buttons.pressedColor[control.color] + } else if (control.hovered) { + hifi.buttons.hoveredColor[control.color] + } else { + hifi.buttons.colorFinish[control.color] + } + } + } + } + } + + label: HiFiGlyphs { + color: enabled ? hifi.buttons.textColor[control.color] + : hifi.buttons.disabledTextColor[control.colorScheme] + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors { + // Tweak horizontal alignment so that it looks right. + left: parent.left + leftMargin: -0.5 + } + text: control.glyph + size: control.size + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml new file mode 100644 index 0000000000..425500f1d4 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml @@ -0,0 +1,20 @@ +// +// HorizontalRule.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +Rectangle { + anchors.left: parent.left + anchors.right: parent.right + height: 1 + color: hifi.colors.lightGray +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml new file mode 100644 index 0000000000..545154ab44 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml @@ -0,0 +1,21 @@ +// +// HorizontalSpacer.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 + +import "../styles-uit" + +Item { + id: root + property alias size: root.width + + width: hifi.dimensions.controlInterlineHeight + height: 1 // Must be non-zero +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml new file mode 100644 index 0000000000..330d74fa14 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml @@ -0,0 +1,22 @@ +// +// Label.qml +// +// Created by David Rowe on 26 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 + +import "../styles-uit" + +RalewaySemiBold { + HifiConstants { id: hifi } + property int colorScheme: hifi.colorSchemes.light + + size: hifi.fontSizes.inputLabel + color: enabled ? (colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGray : hifi.colors.lightGrayText) + : (colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight); +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml new file mode 100644 index 0000000000..36ffbe582f --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml @@ -0,0 +1,43 @@ +// +// QueuedButton.qml +// -- original Button.qml + signal timer workaround --ht +// Created by David Rowe on 16 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "." as HifiControls + +HifiControls.Button { + // FIXME: THIS WORKAROUND MIGRATED/CONSOLIDATED FROM RUNNINGSCRIPTS.QML + + // For some reason trigginer an API that enters + // an internal event loop directly from the button clicked + // trigger below causes the appliction to behave oddly. + // Most likely because the button onClicked handling is never + // completed until the function returns. + // FIXME find a better way of handling the input dialogs that + // doesn't trigger this. + + // NOTE: dialogs that need to use this workaround can connect via + // onQueuedClicked: ... + // instead of: + // onClicked: ... + + signal clickedQueued() + Timer { + id: fromTimer + interval: 5 + repeat: false + running: false + onTriggered: clickedQueued() + } + onClicked: fromTimer.running = true +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml new file mode 100644 index 0000000000..ab11ec68b1 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml @@ -0,0 +1,71 @@ +// +// RadioButton.qml +// +// Created by Cain Kilgore on 20th July 2017 +// Copyright 2017 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "../controls-uit" as HifiControls + +Original.RadioButton { + id: radioButton + HifiConstants { id: hifi } + + property int colorScheme: hifi.colorSchemes.light + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + + readonly property int boxSize: 14 + readonly property int boxRadius: 3 + readonly property int checkSize: 10 + readonly property int checkRadius: 2 + + style: RadioButtonStyle { + indicator: Rectangle { + id: box + width: boxSize + height: boxSize + radius: 7 + gradient: Gradient { + GradientStop { + position: 0.2 + color: pressed || hovered + ? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkStart : hifi.colors.checkboxLightStart) + : (radioButton.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart) + } + GradientStop { + position: 1.0 + color: pressed || hovered + ? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkFinish : hifi.colors.checkboxLightFinish) + : (radioButton.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) + } + } + + Rectangle { + id: check + width: checkSize + height: checkSize + radius: 7 + anchors.centerIn: parent + color: "#00B4EF" + border.width: 1 + border.color: "#36CDFF" + visible: checked && !pressed || !checked && pressed + } + } + + label: RalewaySemiBold { + text: control.text + size: hifi.fontSizes.inputLabel + color: isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText + x: radioButton.boxSize / 2 + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml new file mode 100644 index 0000000000..5a775221f6 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml @@ -0,0 +1,38 @@ +// +// Separator.qml +// +// Created by Zach Fox on 2017-06-06 +// Copyright 2017 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import "../styles-uit" + +Item { + // Size + height: 2; + Rectangle { + // Size + width: parent.width; + height: 1; + // Anchors + anchors.left: parent.left; + anchors.bottom: parent.bottom; + anchors.bottomMargin: height; + // Style + color: hifi.colors.baseGrayShadow; + } + Rectangle { + // Size + width: parent.width; + height: 1; + // Anchors + anchors.left: parent.left; + anchors.bottom: parent.bottom; + // Style + color: hifi.colors.baseGrayHighlight; + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml new file mode 100644 index 0000000000..89bae9bcde --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml @@ -0,0 +1,98 @@ +// +// Slider.qml +// +// Created by David Rowe on 27 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "../controls-uit" as HifiControls + +Slider { + id: slider + + property int colorScheme: hifi.colorSchemes.light + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property string label: "" + property real controlHeight: height + (sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0) + + height: hifi.fontSizes.textFieldInput + 14 // Match height of TextField control. + y: sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0 + + style: SliderStyle { + + groove: Rectangle { + implicitWidth: 50 + implicitHeight: hifi.dimensions.sliderGrooveHeight + radius: height / 2 + color: isLightColorScheme ? hifi.colors.sliderGutterLight : hifi.colors.sliderGutterDark + + Rectangle { + width: parent.height - 2 + height: slider.width * (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue) - 1 + radius: height / 2 + anchors { + top: parent.top + topMargin: width + 1 + left: parent.left + leftMargin: 1 + } + transformOrigin: Item.TopLeft + rotation: -90 + gradient: Gradient { + GradientStop { position: 0.0; color: hifi.colors.blueAccent } + GradientStop { position: 1.0; color: hifi.colors.primaryHighlight } + } + } + } + + handle: Rectangle { + implicitWidth: hifi.dimensions.sliderHandleSize + implicitHeight: hifi.dimensions.sliderHandleSize + radius: height / 2 + border.width: 1 + border.color: isLightColorScheme ? hifi.colors.sliderBorderLight : hifi.colors.sliderBorderDark + gradient: Gradient { + GradientStop { + position: 0.0 + color: pressed || hovered + ? (isLightColorScheme ? hifi.colors.sliderDarkStart : hifi.colors.sliderLightStart ) + : (isLightColorScheme ? hifi.colors.sliderLightStart : hifi.colors.sliderDarkStart ) + } + GradientStop { + position: 1.0 + color: pressed || hovered + ? (isLightColorScheme ? hifi.colors.sliderDarkFinish : hifi.colors.sliderLightFinish ) + : (isLightColorScheme ? hifi.colors.sliderLightFinish : hifi.colors.sliderDarkFinish ) + } + } + + Rectangle { + height: parent.height - 2 + width: height + radius: height / 2 + anchors.centerIn: parent + color: hifi.colors.transparent + border.width: 1 + border.color: hifi.colors.black + } + } + } + + HifiControls.Label { + id: sliderLabel + text: slider.label + colorScheme: slider.colorScheme + anchors.left: parent.left + anchors.bottom: parent.top + anchors.bottomMargin: 2 + visible: label != "" + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml new file mode 100644 index 0000000000..a1237d4bc7 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml @@ -0,0 +1,117 @@ +// +// SpinBox.qml +// +// Created by David Rowe on 26 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" +import "../controls-uit" as HifiControls + +SpinBox { + id: spinBox + + property int colorScheme: hifi.colorSchemes.light + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property string label: "" + property string labelInside: "" + property color colorLabelInside: hifi.colors.white + property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0) + + FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } + font.family: firaSansSemiBold.name + font.pixelSize: hifi.fontSizes.textFieldInput + height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control. + + y: spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0 + + style: SpinBoxStyle { + id: spinStyle + background: Rectangle { + color: isLightColorScheme + ? (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGray) + : (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow) + border.color: spinBoxLabelInside.visible ? spinBoxLabelInside.color : hifi.colors.primaryHighlight + border.width: spinBox.activeFocus ? spinBoxLabelInside.visible ? 2 : 1 : 0 + } + + textColor: isLightColorScheme + ? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.lightGray) + : (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText) + selectedTextColor: hifi.colors.black + selectionColor: hifi.colors.primaryHighlight + + horizontalAlignment: Qt.AlignLeft + padding.left: spinBoxLabelInside.visible ? 30 : hifi.dimensions.textPadding + padding.right: hifi.dimensions.spinnerSize + padding.top: 0 + + incrementControl: HiFiGlyphs { + id: incrementButton + text: hifi.glyphs.caratUp + x: 10 + y: 1 + size: hifi.dimensions.spinnerSize + color: styleData.upPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray + } + + decrementControl: HiFiGlyphs { + text: hifi.glyphs.caratDn + x: 10 + y: -1 + size: hifi.dimensions.spinnerSize + color: styleData.downPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray + } + } + + HifiControls.Label { + id: spinBoxLabel + text: spinBox.label + colorScheme: spinBox.colorScheme + anchors.left: parent.left + anchors.bottom: parent.top + anchors.bottomMargin: 4 + visible: label != "" + } + + HifiControls.Label { + id: spinBoxLabelInside + text: spinBox.labelInside + anchors.left: parent.left + anchors.leftMargin: 10 + font.bold: true + anchors.verticalCenter: parent.verticalCenter + color: spinBox.colorLabelInside + visible: spinBox.labelInside != "" + } + + MouseArea { + anchors.fill: parent + propagateComposedEvents: true + onWheel: { + if(spinBox.activeFocus) + wheel.accepted = false + else + wheel.accepted = true + } + onPressed: { + mouse.accepted = false + } + onReleased: { + mouse.accepted = false + } + onClicked: { + mouse.accepted = false + } + onDoubleClicked: { + mouse.accepted = false + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml new file mode 100644 index 0000000000..d54f986717 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml @@ -0,0 +1,156 @@ +// +// Switch.qml +// +// Created by Zach Fox on 2017-06-06 +// Copyright 2017 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" + +Item { + id: rootSwitch; + + property int colorScheme: hifi.colorSchemes.light; + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light; + property int switchWidth: 70; + readonly property int switchRadius: height/2; + property string labelTextOff: ""; + property string labelGlyphOffText: ""; + property int labelGlyphOffSize: 32; + property string labelTextOn: ""; + property string labelGlyphOnText: ""; + property int labelGlyphOnSize: 32; + property alias checked: originalSwitch.checked; + signal onCheckedChanged; + signal clicked; + + Original.Switch { + id: originalSwitch; + activeFocusOnPress: true; + anchors.top: rootSwitch.top; + anchors.left: rootSwitch.left; + anchors.leftMargin: rootSwitch.width/2 - rootSwitch.switchWidth/2; + onCheckedChanged: rootSwitch.onCheckedChanged(); + onClicked: rootSwitch.clicked(); + + style: SwitchStyle { + + padding { + top: 3; + left: 3; + right: 3; + bottom: 3; + } + + groove: Rectangle { + color: "#252525"; + implicitWidth: rootSwitch.switchWidth; + implicitHeight: rootSwitch.height; + radius: rootSwitch.switchRadius; + } + + handle: Rectangle { + id: switchHandle; + implicitWidth: rootSwitch.height - padding.top - padding.bottom; + implicitHeight: implicitWidth; + radius: implicitWidth/2; + border.color: hifi.colors.lightGrayText; + color: hifi.colors.lightGray; + + MouseArea { + anchors.fill: parent; + hoverEnabled: true; + onEntered: parent.color = hifi.colors.blueHighlight; + onExited: parent.color = hifi.colors.lightGray; + } + } + } + } + + // OFF Label + Item { + anchors.right: originalSwitch.left; + anchors.rightMargin: 10; + anchors.top: rootSwitch.top; + height: rootSwitch.height; + + RalewaySemiBold { + id: labelOff; + text: labelTextOff; + size: hifi.fontSizes.inputLabel; + color: originalSwitch.checked ? hifi.colors.lightGrayText : "#FFFFFF"; + anchors.top: parent.top; + anchors.right: parent.right; + width: paintedWidth; + height: parent.height; + verticalAlignment: Text.AlignVCenter; + } + + HiFiGlyphs { + id: labelGlyphOff; + text: labelGlyphOffText; + size: labelGlyphOffSize; + color: labelOff.color; + anchors.top: parent.top; + anchors.topMargin: 2; + anchors.right: labelOff.left; + anchors.rightMargin: 4; + } + + MouseArea { + anchors.top: parent.top; + anchors.bottom: parent.bottom; + anchors.left: labelGlyphOff.left; + anchors.right: labelOff.right; + onClicked: { + originalSwitch.checked = false; + } + } + } + + // ON Label + Item { + anchors.left: originalSwitch.right; + anchors.leftMargin: 10; + anchors.top: rootSwitch.top; + height: rootSwitch.height; + + RalewaySemiBold { + id: labelOn; + text: labelTextOn; + size: hifi.fontSizes.inputLabel; + color: originalSwitch.checked ? "#FFFFFF" : hifi.colors.lightGrayText; + anchors.top: parent.top; + anchors.left: parent.left; + width: paintedWidth; + height: parent.height; + verticalAlignment: Text.AlignVCenter; + } + + HiFiGlyphs { + id: labelGlyphOn; + text: labelGlyphOnText; + size: labelGlyphOnSize; + color: labelOn.color; + anchors.top: parent.top; + anchors.left: labelOn.right; + } + + MouseArea { + anchors.top: parent.top; + anchors.bottom: parent.bottom; + anchors.left: labelOn.left; + anchors.right: labelGlyphOn.right; + onClicked: { + originalSwitch.checked = true; + } + } + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml new file mode 100644 index 0000000000..11d1920f95 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml @@ -0,0 +1,179 @@ +// +// Table.qml +// +// Created by David Rowe on 18 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +import "../styles-uit" + +TableView { + id: tableView + + property int colorScheme: hifi.colorSchemes.light + readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light + property bool expandSelectedRow: false + property bool centerHeaderText: false + + model: ListModel { } + + headerVisible: false + headerDelegate: Rectangle { + height: hifi.dimensions.tableHeaderHeight + color: isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark + + RalewayRegular { + id: titleText + text: styleData.value + size: hifi.fontSizes.tableHeading + font.capitalization: Font.AllUppercase + color: hifi.colors.baseGrayHighlight + horizontalAlignment: (centerHeaderText ? Text.AlignHCenter : Text.AlignLeft) + anchors { + left: parent.left + leftMargin: hifi.dimensions.tablePadding + right: parent.right + rightMargin: hifi.dimensions.tablePadding + verticalCenter: parent.verticalCenter + } + } + + HiFiGlyphs { + id: titleSort + text: sortIndicatorOrder == Qt.AscendingOrder ? hifi.glyphs.caratUp : hifi.glyphs.caratDn + color: hifi.colors.darkGray + opacity: 0.6; + size: hifi.fontSizes.tableHeadingIcon + anchors { + left: titleText.right + leftMargin: -hifi.fontSizes.tableHeadingIcon / 3 - (centerHeaderText ? 5 : 0) + right: parent.right + rightMargin: hifi.dimensions.tablePadding + verticalCenter: titleText.verticalCenter + } + visible: sortIndicatorVisible && sortIndicatorColumn === styleData.column + } + + Rectangle { + width: 1 + anchors { + left: parent.left + top: parent.top + topMargin: 1 + bottom: parent.bottom + bottomMargin: 2 + } + color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight + visible: styleData.column > 0 + } + + Rectangle { + height: 1 + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight + } + } + + // Use rectangle to draw border with rounded corners. + frameVisible: false + Rectangle { + color: "#00000000" + anchors { fill: parent; margins: -2 } + border.color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight + border.width: 2 + } + anchors.margins: 2 // Shrink TableView to lie within border. + + backgroundVisible: true + + horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff + verticalScrollBarPolicy: Qt.ScrollBarAsNeeded + + style: TableViewStyle { + // Needed in order for rows to keep displaying rows after end of table entries. + backgroundColor: tableView.isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark + alternateBackgroundColor: tableView.isLightColorScheme ? hifi.colors.tableRowLightOdd : hifi.colors.tableRowDarkOdd + + padding.top: headerVisible ? hifi.dimensions.tableHeaderHeight: 0 + + handle: Item { + id: scrollbarHandle + implicitWidth: hifi.dimensions.scrollbarHandleWidth + Rectangle { + anchors { + fill: parent + topMargin: 3 + bottomMargin: 3 // "" + leftMargin: 1 // Move it right + rightMargin: -1 // "" + } + radius: hifi.dimensions.scrollbarHandleWidth/2 + color: isLightColorScheme ? hifi.colors.tableScrollHandleLight : hifi.colors.tableScrollHandleDark + } + } + + scrollBarBackground: Item { + implicitWidth: hifi.dimensions.scrollbarBackgroundWidth + Rectangle { + anchors { + fill: parent + margins: -1 // Expand + topMargin: -1 + } + color: isLightColorScheme ? hifi.colors.tableScrollBackgroundLight : hifi.colors.tableScrollBackgroundDark + + // Extend header color above scrollbar background + Rectangle { + anchors { + top: parent.top + topMargin: -hifi.dimensions.tableHeaderHeight + left: parent.left + right: parent.right + } + height: hifi.dimensions.tableHeaderHeight + color: tableView.isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark + visible: headerVisible + } + Rectangle { + // Extend header bottom border + anchors { + top: parent.top + left: parent.left + right: parent.right + } + height: 1 + color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight + visible: headerVisible + } + } + } + + incrementControl: Item { + visible: false + } + + decrementControl: Item { + visible: false + } + } + + rowDelegate: Rectangle { + height: (styleData.selected && expandSelectedRow ? 1.8 : 1) * hifi.dimensions.tableRowHeight + color: styleData.selected + ? hifi.colors.primaryHighlight + : tableView.isLightColorScheme + ? (styleData.alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd) + : (styleData.alternate ? hifi.colors.tableRowDarkEven : hifi.colors.tableRowDarkOdd) + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml new file mode 100644 index 0000000000..2df65f1002 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml @@ -0,0 +1,21 @@ +// +// VerticalSpacer.qml +// +// Created by David Rowe on 16 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 + +import "../styles-uit" + +Item { + id: root + property alias size: root.height + + width: 1 // Must be non-zero + height: hifi.dimensions.controlInterlineHeight +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml new file mode 100644 index 0000000000..789689973b --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml @@ -0,0 +1,23 @@ +// +// AnonymousProRegular.qml +// +// Created by David Rowe on 12 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +Text { + id: root + FontLoader { id: anonymousProRegular; source: "../../fonts/AnonymousPro-Regular.ttf"; } + property real size: 32 + font.pixelSize: size + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + font.family: anonymousProRegular.name +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml new file mode 100644 index 0000000000..aade5fb439 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml @@ -0,0 +1,18 @@ +// +// ButtonLabel.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import "." + +RalewayBold { + font.pixelSize: hifi.fontSizes.buttonLabel +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml new file mode 100644 index 0000000000..4ae0826772 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml @@ -0,0 +1,23 @@ +// +// FiraSansRegular.qml +// +// Created by David Rowe on 12 May 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +Text { + id: root + FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } + property real size: 32 + font.pixelSize: size + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + font.family: firaSansRegular.name +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml new file mode 100644 index 0000000000..b3f3324090 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml @@ -0,0 +1,23 @@ +// +// FiraSansSemiBold.qml +// +// Created by David Rowe on 12 Feb 2016 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + +Text { + id: root + FontLoader { id: firaSansSemiBold; source: pathToFonts + "fonts/FiraSans-SemiBold.ttf"; } + property real size: 32 + font.pixelSize: size + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + font.family: firaSansSemiBold.name +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..62898a891eb53784c3db5fba53a950848e4ef57a GIT binary patch literal 4097 zcmd6qUue@;6vsbF+a&eRn*N=0C}9h@4caP*$X;e$)nrQ{uHEp#QL{F&+0v$_snoGa zAo>t8!NKskjKO^HLD(LuOb{mcB16VtV{d~Fx>2OEmp%v?=iK{Cf2NJ5Aakdb^Sk$+ z`#tB}^S$Ty%bBzL$Ho)+L_6SVZQ=KK{@Fh2fvzpE`*z>SsrI{97Qg=d!OgkVrX9db zz^->+{c>XWcZFk_t*3X+?fGL5uoD<>fdKFoM!v7nx9!-`JwOw1u*v9x3_#a+c;J)= zu6h73#Jw=@g%z&_u@c&19?skGi&jTmT41*lv@?y#yv6<2nzvc)#ue$JAQ9G;_*S#z z;K(_P)Z%nA|3n3ia7bYwfh{#!TJk%q~{2l!7|cL!MnbO;$`hzMcnw#STc6z3p#70LzS;u zBat5FmCNQD`KsqGBKgX_xz_@}w7_x;bon6WgOfhU_~3#MuKC~xA1wRekq@@{A?$~f zez@R=dwzK2hrs}h1mHpdz6ro$0Is#dy;f+p{Ypg6;W&AYGfSE=KG9jJbM1T|Z(oFGiLG<0Q#xTq)Az zNH9!-DP|ZZ$s}nGYg|%o!v3s-+3}Bl2n;v*%!LnJ`>tBqs9> zHpf8@Fv0`}fy}TbO{TV4P$77}BYOFN55-ZIv zMQ<6qN0n&lr=fBx5Ls|G4&0PW6fHG}qs2Rcf#Tnuwu=ucmC8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9E7--jR#B=a)s!jg z(r<304$hGzp@^kv?9jQ-&_!sKsp>R3=$m2C#A#2hOpvUI59oVzf+sk@00-!%!+4X? zNC&i^hKLj8tnMX9tDM}Iuc+TE>4i}4w@`K=V&!5>RxY_{<;Lg3U)yqj6~eji`|`v7 z(6po2b4`XcoU3XNXJ`FA**`q>7w;Adg}$6yDx6&i$%>U9pSSYKMJpd$3T0;_r*4#x ze*al-0>^$RcWTMX#TKnxa^A{~&#mi&99(PokX;B`xqCf@_io8UJUbf<=X%?x`|_Ka<{@?sd}&y zD{w2EU5J=i=d65k-pa=oL-|uHqp`Y9C}|Vd3Ds69 zBCZKY7AIiYA=h(N6!)$bB>X~-*1 z@_9`vvc}OPuS@5m>B~RAFPyIkb%7 literal 0 HcmV?d00001 diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml new file mode 100644 index 0000000000..4a26d11128 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml @@ -0,0 +1,342 @@ +// +// HiFiConstants.qml +// +// Created by Bradley Austin Davis on 28 Apr 2015 +// Copyright 2015 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Window 2.2 + +Item { + readonly property alias colors: colors + readonly property alias colorSchemes: colorSchemes + readonly property alias dimensions: dimensions + readonly property alias fontSizes: fontSizes + readonly property alias glyphs: glyphs + readonly property alias icons: icons + readonly property alias buttons: buttons + readonly property alias effects: effects + + function glyphForIcon(icon) { + // Translates icon enum to glyph char. + var glyph; + switch (icon) { + case hifi.icons.information: + glyph = hifi.glyphs.info; + break; + case hifi.icons.question: + glyph = hifi.glyphs.question; + break; + case hifi.icons.warning: + glyph = hifi.glyphs.alert; + break; + case hifi.icons.critical: + glyph = hifi.glyphs.error; + break; + case hifi.icons.placemark: + glyph = hifi.glyphs.placemark; + break; + default: + glyph = hifi.glyphs.noIcon; + } + return glyph; + } + + Item { + id: colors + + // Base colors + readonly property color baseGray: "#393939" + readonly property color darkGray: "#121212" + readonly property color baseGrayShadow: "#252525" + readonly property color baseGrayHighlight: "#575757" + readonly property color lightGray: "#6a6a6a" + readonly property color lightGrayText: "#afafaf" + readonly property color faintGray: "#e3e3e3" + readonly property color primaryHighlight: "#00b4ef" + readonly property color blueHighlight: "#00b4ef" + readonly property color blueAccent: "#0093C5" + readonly property color redHighlight: "#EA4C5F" + readonly property color redAccent: "#C62147" + readonly property color greenHighlight: "#1ac567" + readonly property color greenShadow: "#359D85" + readonly property color orangeHighlight: "#FFC49C" + readonly property color orangeAccent: "#FF6309" + readonly property color indigoHighlight: "#C0D2FF" + readonly property color indigoAccent: "#9495FF" + readonly property color magentaHighlight: "#EF93D1" + readonly property color magentaAccent: "#A2277C" + readonly property color checkboxCheckedRed: "#FF0000" + readonly property color checkboxCheckedBorderRed: "#D00000" + readonly property color lightBlueHighlight: "#d6f6ff" + + // Semitransparent + readonly property color darkGray30: "#4d121212" + readonly property color darkGray0: "#00121212" + readonly property color baseGrayShadow60: "#99252525" + readonly property color baseGrayShadow50: "#80252525" + readonly property color baseGrayShadow25: "#40252525" + readonly property color baseGrayHighlight40: "#66575757" + readonly property color baseGrayHighlight15: "#26575757" + readonly property color lightGray50: "#806a6a6a" + readonly property color lightGrayText80: "#ccafafaf" + readonly property color faintGray80: "#cce3e3e3" + readonly property color faintGray50: "#80e3e3e3" + + // Other colors + readonly property color white: "#ffffff" + readonly property color gray: "#808080" + readonly property color black: "#000000" + readonly property color locked: "#252525" + // Semitransparent + readonly property color white50: "#80ffffff" + readonly property color white30: "#4dffffff" + readonly property color white25: "#40ffffff" + readonly property color transparent: "#00ffffff" + + // Control specific colors + readonly property color tableRowLightOdd: "#fafafa" + readonly property color tableRowLightEven: "#eeeeee" // Equivavlent to "#1a575757" over #e3e3e3 background + readonly property color tableRowDarkOdd: "#2e2e2e" // Equivalent to "#80393939" over #404040 background + readonly property color tableRowDarkEven: "#1c1c1c" // Equivalent to "#a6181818" over #404040 background + readonly property color tableBackgroundLight: tableRowLightEven + readonly property color tableBackgroundDark: tableRowDarkEven + readonly property color tableScrollHandleLight: "#DDDDDD" + readonly property color tableScrollHandleDark: "#707070" + readonly property color tableScrollBackgroundLight: tableRowLightOdd + readonly property color tableScrollBackgroundDark: "#323232" + readonly property color checkboxLightStart: "#ffffff" + readonly property color checkboxLightFinish: "#afafaf" + readonly property color checkboxDarkStart: "#7d7d7d" + readonly property color checkboxDarkFinish: "#6b6a6b" + readonly property color checkboxChecked: primaryHighlight + readonly property color checkboxCheckedBorder: "#36cdff" + readonly property color sliderGutterLight: "#d4d4d4" + readonly property color sliderGutterDark: "#252525" + readonly property color sliderBorderLight: "#afafaf" + readonly property color sliderBorderDark: "#7d7d7d" + readonly property color sliderLightStart: "#ffffff" + readonly property color sliderLightFinish: "#afafaf" + readonly property color sliderDarkStart: "#7d7d7d" + readonly property color sliderDarkFinish: "#6b6a6b" + readonly property color dropDownPressedLight: "#d4d4d4" + readonly property color dropDownPressedDark: "#afafaf" + readonly property color dropDownLightStart: "#ffffff" + readonly property color dropDownLightFinish: "#afafaf" + readonly property color dropDownDarkStart: "#7d7d7d" + readonly property color dropDownDarkFinish: "#6b6a6b" + readonly property color textFieldLightBackground: "#d4d4d4" + readonly property color tabBackgroundDark: "#252525" + readonly property color tabBackgroundLight: "#d4d4d4" + } + + Item { + id: colorSchemes + readonly property int light: 0 + readonly property int dark: 1 + } + + Item { + id: dimensions + readonly property bool largeScreen: Screen.width >= 1920 && Screen.height >= 1080 + readonly property real borderRadius: largeScreen ? 7.5 : 5.0 + readonly property real borderWidth: largeScreen ? 2 : 1 + readonly property vector2d contentMargin: Qt.vector2d(21, 21) + readonly property vector2d contentSpacing: Qt.vector2d(11, 14) + readonly property real labelPadding: 40 + readonly property real textPadding: 8 + readonly property real sliderHandleSize: 18 + readonly property real sliderGrooveHeight: 8 + readonly property real frameIconSize: 22 + readonly property real spinnerSize: 50 + readonly property real tablePadding: 12 + readonly property real tableRowHeight: largeScreen ? 26 : 23 + readonly property real tableHeaderHeight: 29 + readonly property vector2d modalDialogMargin: Qt.vector2d(50, 30) + readonly property real modalDialogTitleHeight: 40 + readonly property real controlLineHeight: 28 // Height of spinbox control on 1920 x 1080 monitor + readonly property real controlInterlineHeight: 21 // 75% of controlLineHeight + readonly property vector2d menuPadding: Qt.vector2d(14, 102) + readonly property real scrollbarBackgroundWidth: 18 + readonly property real scrollbarHandleWidth: scrollbarBackgroundWidth - 2 + readonly property real tabletMenuHeader: 90 + } + + Item { + id: fontSizes // In pixels + readonly property real overlayTitle: dimensions.largeScreen ? 18 : 14 + readonly property real tabName: dimensions.largeScreen ? 12 : 10 + readonly property real sectionName: dimensions.largeScreen ? 12 : 10 + 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 tableHeading: dimensions.largeScreen ? 12 : 10 + readonly property real tableHeadingIcon: dimensions.largeScreen ? 60 : 33 + readonly property real tableText: dimensions.largeScreen ? 15 : 12 + readonly property real buttonLabel: dimensions.largeScreen ? 13 : 9 + readonly property real iconButton: dimensions.largeScreen ? 13 : 9 + readonly property real listItem: dimensions.largeScreen ? 15 : 11 + readonly property real tabularData: dimensions.largeScreen ? 15 : 11 + readonly property real logs: dimensions.largeScreen ? 16 : 12 + readonly property real code: dimensions.largeScreen ? 16 : 12 + readonly property real rootMenu: dimensions.largeScreen ? 15 : 11 + readonly property real rootMenuDisclosure: dimensions.largeScreen ? 20 : 16 + readonly property real menuItem: dimensions.largeScreen ? 15 : 11 + readonly property real shortcutText: dimensions.largeScreen ? 13 : 9 + readonly property real carat: dimensions.largeScreen ? 38 : 30 + readonly property real disclosureButton: dimensions.largeScreen ? 30 : 22 + } + + Item { + id: icons + // Values per OffscreenUi::Icon + readonly property int none: 0 + readonly property int question: 1 + readonly property int information: 2 + readonly property int warning: 3 + readonly property int critical: 4 + readonly property int placemark: 5 + } + + Item { + id: buttons + readonly property int white: 0 + readonly property int blue: 1 + readonly property int red: 2 + readonly property int black: 3 + readonly property var textColor: [ colors.darkGray, colors.white, colors.white, colors.white ] + readonly property var colorStart: [ colors.white, colors.primaryHighlight, "#d42043", "#343434" ] + readonly property var colorFinish: [ colors.lightGrayText, colors.blueAccent, "#94132e", colors.black ] + readonly property var hoveredColor: [ colorStart[white], colorStart[blue], colorStart[red], colorFinish[black] ] + readonly property var pressedColor: [ colorFinish[white], colorFinish[blue], colorFinish[red], colorStart[black] ] + readonly property var disabledColorStart: [ colorStart[white], colors.baseGrayHighlight] + readonly property var disabledColorFinish: [ colorFinish[white], colors.baseGrayShadow] + readonly property var disabledTextColor: [ colors.lightGrayText, colors.baseGrayShadow] + readonly property int radius: 5 + } + + QtObject { + id: effects + readonly property int fadeInDuration: 300 + } + Item { + id: glyphs + readonly property string noIcon: "" + readonly property string hmd: "b" + readonly property string screen: "c" + readonly property string keyboard: "d" + readonly property string handControllers: "e" + readonly property string headphonesMic: "f" + readonly property string gamepad: "g" + readonly property string headphones: "h" + readonly property string mic: "i" + readonly property string upload: "j" + readonly property string script: "k" + readonly property string text: "l" + readonly property string cube: "m" + readonly property string sphere: "n" + readonly property string zone: "o" + readonly property string light: "p" + readonly property string web: "q" + readonly property string web2: "r" + readonly property string edit: "s" + readonly property string market: "t" + readonly property string directory: "u" + readonly property string menu: "v" + readonly property string close: "w" + readonly property string closeInverted: "x" + readonly property string pin: "y" + readonly property string pinInverted: "z" + readonly property string resizeHandle: "A" + readonly property string disclosureExpand: "B" + readonly property string reloadSmall: "a" + readonly property string closeSmall: "C" + readonly property string forward: "D" + readonly property string backward: "E" + readonly property string reload: "F" + readonly property string unmuted: "G" + readonly property string muted: "H" + readonly property string minimize: "I" + readonly property string maximize: "J" + readonly property string maximizeInverted: "K" + readonly property string disclosureButtonExpand: "L" + readonly property string disclosureButtonCollapse: "M" + readonly property string scriptStop: "N" + readonly property string scriptReload: "O" + readonly property string scriptRun: "P" + readonly property string scriptNew: "Q" + readonly property string hifiForum: "2" + readonly property string hifiLogoSmall: "S" + readonly property string avatar1: "T" + readonly property string placemark: "U" + readonly property string box: "V" + readonly property string community: "0" + readonly property string grabHandle: "X" + readonly property string search: "Y" + readonly property string disclosureCollapse: "Z" + readonly property string scriptUpload: "R" + readonly property string code: "W" + readonly property string avatar: "<" + readonly property string arrowsH: ":" + readonly property string arrowsV: ";" + readonly property string arrows: "`" + readonly property string compress: "!" + readonly property string expand: "\"" + readonly property string placemark1: "#" + readonly property string circle: "$" + readonly property string handPointer: "9" + readonly property string plusSquareO: "%" + readonly property string sliders: "&" + readonly property string square: "'" + readonly property string alignCenter: "8" + readonly property string alignJustify: ")" + readonly property string alignLeft: "*" + readonly property string alignRight: "^" + readonly property string bars: "7" + readonly property string circleSlash: "," + readonly property string sync: "()" + readonly property string key: "-" + readonly property string link: "." + readonly property string location: "/" + readonly property string caratR: "3" + readonly property string caratL: "4" + readonly property string caratDn: "5" + readonly property string caratUp: "6" + readonly property string folderLg: ">" + readonly property string folderSm: "?" + readonly property string levelUp: "1" + readonly property string info: "[" + readonly property string question: "]" + readonly property string alert: "+" + readonly property string home: "_" + readonly property string error: "=" + readonly property string settings: "@" + readonly property string trash: "{" + readonly property string objectGroup: "\ue000" + readonly property string cm: "}" + readonly property string msvg79: "~" + readonly property string deg: "\\" + readonly property string px: "|" + readonly property string editPencil: "\ue00d" + readonly property string vol_0: "\ue00e" + readonly property string vol_1: "\ue00f" + readonly property string vol_2: "\ue010" + readonly property string vol_3: "\ue011" + readonly property string vol_4: "\ue012" + readonly property string vol_x_0: "\ue013" + readonly property string vol_x_1: "\ue014" + readonly property string vol_x_2: "\ue015" + readonly property string vol_x_3: "\ue016" + readonly property string vol_x_4: "\ue017" + readonly property string source: "\ue01c" + readonly property string playback_play: "\ue01d" + readonly property string stop_square: "\ue01e" + readonly property string avatarTPose: "\ue01f" + readonly property string lock: "\ue006" + } +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..686f84ad173d629beb11885bdba32232ee46d480 GIT binary patch literal 51320 zcmeI53!Gd7k9Jr|NL&<>aL!d?inJu z$$mWfbb8J`Ri~;>ojP^uRNd-Tt0ymMT-3SfG{BsA96y@*+f!~eQ1==*>zqH{dD}f7 z|H@5=AN|93@Bi`p|JA^c4P5j5KfLLb*YAJshK`0WpZ<;4{Q4z8pMh=D;Cx^U9&RwD z-whcaz7H6%z`duziNHgu1f=vGN^7CP!VV?ML46K-a*!VdH;jV&M#1Bwp!zs?({b?d zagZDjD~^X<$3w#ju;T<^G}MoVp3%@h8mdnOcOvwi2oq0&?vr5ONsycjZ6`zT$&eod z4P#)(7~mABKLvVDf&NpV`c$~@RCxSUm@yXa9Siw9yeSWl^syqeBVY}ZeZTHT??`{R^MI9@AfkMZl|Flzw3aRK=Q^?eyhsxYhhnSe)EB= zmG`eo`DNWzXlH0|CrL$q6M-s?tBhZz{yFJS=%0bm@FxG{flN=|o+SwN4&QHOpVYQ2 zB!BHm&&~L}BTE_bhwr!1H;7N%?=J=}&D_`RzP zzb#B0)K4*Vzqyppd&=;62h|n%^!$y_7}~e344?O=mar6tYG3bLe45a{zb(V>{X>kq z82Vf(pY3J%e29F-_VG5K@jtWtpD4rU!^4c*sgRD1pqQ1$#WSA5adD*3oeiMtGd=rM znRb7aJ{$MrKnR1RFPmHgznx|HZO4s>U-dnnLE!h9GWQ>KO%m;*?pBy2-n+3YQzO)u z?)R1Q`*In6pC%bmd;8vB%5P5@emmJQqW-P^Kq2q~9p@shaUKxI07-9W-K2}=4hs*H$;t0oYm?%U2 zeprUzmuMSN|2FI>t>1w%{CY=d4|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vmUtUfjJM%%Y8S@b;BK9EI{Sx5C(^s zAxVt4O(+W2FvA4MU~rZR;$#?7T84S_A%sDkNi{>xB?;mrIY|OT?cp;d8N(nUXEPwq zEYqZwr3^_@OyOgk6lr`_+U8m172?D&h%&`Vg}}rs&oL5eUdF;Jc@&J}3LQv0ZM>dc zTUZPyNMT@*Vp5$A8_&0Eqw25y%_vdQoFvJVLikiuJdI|X^*Ba~3FUPw@w98JqbdoK zjFYV7Ygr?sIC_F88R8ryO_Z}7CP9=jQk+4KJ1fV7R<Psk?(D z6&GeWL7;*~_!T2fl4%Sw1Q;XEY2wP$Y2u^_FoQu-ts_@qVn99FEe&ysNhazrHo#%x zOslL!RgTjPTQfvtA4)u?6sKn~@F`>|g#oq!v+QLL$JoPehAcFO^7I&SrWhlsxG7^3 zOe;O9xo;`YO*s(oDV&>J4CiJ_p|8xbf6AfU52N|7B_lVaP=s>r z{!sR2*GTqvN6&>n%H{HC&aM^8E(GOGI6qSg=O-7#`S?;Wdo%Lpx677(`>9+mv-_7y(&uY3cdfTzi1j* zvJ4!^zvew~;m4i}vaOZ1Y7-;Z)kK>ispB?7@_8mmDu$i~!n;c2!Jeu4@nFxn`S7k% zD7z48FBy77_&K>c{Bs^6fW-ESMJ$g27AsP?1&hVg!k`;q)_w-E8c^&|OK fvyu7#ezcbJuQY=C^`aSnAHRMy@NnYwfcnwDIQ;JV literal 0 HcmV?d00001 diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml new file mode 100644 index 0000000000..a3ab351870 --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml @@ -0,0 +1,18 @@ +// +// ShortcutText.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import "." + +RalewayLight { + font.pixelSize: hifi.fontSizes.shortcutText +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml new file mode 100644 index 0000000000..eb4e790e7e --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml @@ -0,0 +1,19 @@ +// +// TabName.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import "." + +RalewayRegular { + font.pixelSize: hifi.fontSizes.tabName + font.capitalization: Font.AllUppercase +} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml new file mode 100644 index 0000000000..010b4d03ad --- /dev/null +++ b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml @@ -0,0 +1,18 @@ +// +// TextFieldInput.qml +// +// Created by Clement on 7/18/16 +// Copyright 2016 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.5 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import "." + +FiraSansSemiBold { + font.pixelSize: hifi.fontSizes.textFieldInput +} diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index 60929d75c0..1cf88ec5ac 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -7,215 +7,246 @@ // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html // -import QtQuick 2.5 +import QtQuick 2.7 import QtQuick.Controls 1.4 -import "configSlider" +import QtQuick.Layouts 1.3 -Column { - spacing: 8 - property var mainViewTask: Render.getConfig("RenderMainView") - - Row { - spacing: 8 - Column { - spacing: 10 - Repeater { - model: [ - "Unlit:LightingModel:enableUnlit", - "Emissive:LightingModel:enableEmissive", - "Lightmap:LightingModel:enableLightmap", - "Background:LightingModel:enableBackground", - "ssao:AmbientOcclusion:enabled", - "Textures:LightingModel:enableMaterialTexturing" - ] - CheckBox { - text: modelData.split(":")[0] - checked: mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] - onCheckedChanged: { mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } - } - } - } +import "../lib/hifi-qml/styles-uit" +import "../lib/hifi-qml/controls-uit" as HifiControls +import "../lib/configprop" +Rectangle { + id: render; + HifiConstants { id: hifi;} + color: hifi.colors.baseGray; + property var mainViewTask: Render.getConfig("RenderMainView") - Column { - spacing: 10 - Repeater { - model: [ - "Obscurance:LightingModel:enableObscurance", - "Scattering:LightingModel:enableScattering", - "Diffuse:LightingModel:enableDiffuse", - "Specular:LightingModel:enableSpecular", - "Albedo:LightingModel:enableAlbedo", - "Wireframe:LightingModel:enableWireframe" - ] - CheckBox { - text: modelData.split(":")[0] - checked: mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] - onCheckedChanged: { mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } - } - } - } - - Column { - spacing: 10 - Repeater { - model: [ - "Ambient:LightingModel:enableAmbientLight", - "Directional:LightingModel:enableDirectionalLight", - "Point:LightingModel:enablePointLight", - "Spot:LightingModel:enableSpotLight", - "Light Contour:LightingModel:showLightContour", - "Zone Stack:DrawZoneStack:enabled", - "Shadow:RenderShadowTask:enabled" - ] - CheckBox { - text: modelData.split(":")[0] - checked: mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] - onCheckedChanged: { mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } - } - } - } - } Column { - spacing: 10 - Repeater { - model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0" - ] - ConfigSlider { - label: qsTr(modelData.split(":")[0]) - integral: false - config: mainViewTask.getConfig(modelData.split(":")[1]) - property: modelData.split(":")[2] - max: modelData.split(":")[3] - min: modelData.split(":")[4] + spacing: 10 + + Row { + + spacing: 20 + padding: 10 + Column { + spacing: 10 + Repeater { + model: [ + "Unlit:LightingModel:enableUnlit", + "Emissive:LightingModel:enableEmissive", + "Lightmap:LightingModel:enableLightmap", + "Background:LightingModel:enableBackground", + "ssao:AmbientOcclusion:enabled", + "Textures:LightingModel:enableMaterialTexturing" + ] + HifiControls.CheckBox { + boxSize: 20 + text: modelData.split(":")[0] + checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] + onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } + } + } + } + + + Column { + spacing: 10 + Repeater { + model: [ + "Obscurance:LightingModel:enableObscurance", + "Scattering:LightingModel:enableScattering", + "Diffuse:LightingModel:enableDiffuse", + "Specular:LightingModel:enableSpecular", + "Albedo:LightingModel:enableAlbedo", + "Wireframe:LightingModel:enableWireframe" + ] + HifiControls.CheckBox { + boxSize: 20 + text: modelData.split(":")[0] + checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] + onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } + } + } + } + + Column { + spacing: 10 + Repeater { + model: [ + "Ambient:LightingModel:enableAmbientLight", + "Directional:LightingModel:enableDirectionalLight", + "Point:LightingModel:enablePointLight", + "Spot:LightingModel:enableSpotLight", + "Light Contour:LightingModel:showLightContour", + "Zone Stack:DrawZoneStack:enabled", + "Shadow:RenderShadowTask:enabled" + ] + HifiControls.CheckBox { + boxSize: 20 + text: modelData.split(":")[0] + checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] + onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked } + } + } } } + Separator {} + Column { + spacing: 10 + Repeater { + model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0" + ] + ConfigSlider { + label: qsTr(modelData.split(":")[0]) + integral: false + config: render.mainViewTask.getConfig(modelData.split(":")[1]) + property: modelData.split(":")[2] + max: modelData.split(":")[3] + min: modelData.split(":")[4] + } + } + Row { + HifiControls.Label { + text: "Tone Mapping Curve" + anchors.left: root.left + } + + HifiControls.ComboBox { + anchors.right: root.right + currentIndex: 1 + model: ListModel { + id: cbItems + ListElement { text: "RGB"; color: "Yellow" } + ListElement { text: "SRGB"; color: "Green" } + ListElement { text: "Reinhard"; color: "Yellow" } + ListElement { text: "Filmic"; color: "White" } + } + width: 200 + onCurrentIndexChanged: { render.mainViewTask.getConfig("ToneMapping")["curve"] = currentIndex } + } + } + } Row { - Label { - text: "Tone Mapping Curve" + id: framebuffer + spacing: 10 + height: 24 + + HifiControls.Label { + text: "Debug Framebuffer" + height: 24 anchors.left: root.left } + + property var config: render.mainViewTask.getConfig("DebugDeferredBuffer") - ComboBox { + function setDebugMode(mode) { + framebuffer.config.enabled = (mode != 0); + framebuffer.config.mode = mode; + } + + HifiControls.ComboBox { + height: 24 anchors.right: root.right - currentIndex: 1 + currentIndex: 0 model: ListModel { - id: cbItems - ListElement { text: "RGB"; color: "Yellow" } - ListElement { text: "SRGB"; color: "Green" } - ListElement { text: "Reinhard"; color: "Yellow" } - ListElement { text: "Filmic"; color: "White" } + id: cbItemsFramebuffer + ListElement { text: "Off"; color: "Yellow" } + ListElement { text: "Depth"; color: "Green" } + ListElement { text: "Albedo"; color: "Yellow" } + ListElement { text: "Normal"; color: "White" } + ListElement { text: "Roughness"; color: "White" } + ListElement { text: "Metallic"; color: "White" } + ListElement { text: "Emissive"; color: "White" } + ListElement { text: "Unlit"; color: "White" } + ListElement { text: "Occlusion"; color: "White" } + ListElement { text: "Lightmap"; color: "White" } + ListElement { text: "Scattering"; color: "White" } + ListElement { text: "Lighting"; color: "White" } + ListElement { text: "Shadow"; color: "White" } + ListElement { text: "Linear Depth"; color: "White" } + ListElement { text: "Half Linear Depth"; color: "White" } + ListElement { text: "Half Normal"; color: "White" } + ListElement { text: "Mid Curvature"; color: "White" } + ListElement { text: "Mid Normal"; color: "White" } + ListElement { text: "Low Curvature"; color: "White" } + ListElement { text: "Low Normal"; color: "White" } + ListElement { text: "Curvature Occlusion"; color: "White" } + ListElement { text: "Debug Scattering"; color: "White" } + ListElement { text: "Ambient Occlusion"; color: "White" } + ListElement { text: "Ambient Occlusion Blurred"; color: "White" } + ListElement { text: "Custom"; color: "White" } } width: 200 - onCurrentIndexChanged: { mainViewTask.getConfig("ToneMapping")["curve"] = currentIndex } + onCurrentIndexChanged: { framebuffer.setDebugMode(currentIndex) } } } - } - Row { - id: framebuffer - spacing: 10 - Label { - text: "Debug Framebuffer" - anchors.left: root.left - } - - property var config: mainViewTask.getConfig("DebugDeferredBuffer") + Separator {} + Row { + spacing: 10 + Column { + spacing: 10 - function setDebugMode(mode) { - framebuffer.config.enabled = (mode != 0); - framebuffer.config.mode = mode; - } + HifiControls.CheckBox { + boxSize: 20 + text: "Opaques" + checked: render.mainViewTask.getConfig("DrawOpaqueBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawOpaqueBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Transparents" + checked: render.mainViewTask.getConfig("DrawTransparentBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawTransparentBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Opaques in Front" + checked: render.mainViewTask.getConfig("DrawOverlayInFrontOpaqueBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawOverlayInFrontOpaqueBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Transparents in Front" + checked: render.mainViewTask.getConfig("DrawOverlayInFrontTransparentBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawOverlayInFrontTransparentBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Opaques in HUD" + checked: render.mainViewTask.getConfig("DrawOverlayHUDOpaqueBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawOverlayHUDOpaqueBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Transparents in HUD" + checked: render.mainViewTask.getConfig("DrawOverlayHUDTransparentBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawOverlayHUDTransparentBounds")["enabled"] = checked } + } - ComboBox { - anchors.right: root.right - currentIndex: 0 - model: ListModel { - id: cbItemsFramebuffer - ListElement { text: "Off"; color: "Yellow" } - ListElement { text: "Depth"; color: "Green" } - ListElement { text: "Albedo"; color: "Yellow" } - ListElement { text: "Normal"; color: "White" } - ListElement { text: "Roughness"; color: "White" } - ListElement { text: "Metallic"; color: "White" } - ListElement { text: "Emissive"; color: "White" } - ListElement { text: "Unlit"; color: "White" } - ListElement { text: "Occlusion"; color: "White" } - ListElement { text: "Lightmap"; color: "White" } - ListElement { text: "Scattering"; color: "White" } - ListElement { text: "Lighting"; color: "White" } - ListElement { text: "Shadow"; color: "White" } - ListElement { text: "Linear Depth"; color: "White" } - ListElement { text: "Half Linear Depth"; color: "White" } - ListElement { text: "Half Normal"; color: "White" } - ListElement { text: "Mid Curvature"; color: "White" } - ListElement { text: "Mid Normal"; color: "White" } - ListElement { text: "Low Curvature"; color: "White" } - ListElement { text: "Low Normal"; color: "White" } - ListElement { text: "Curvature Occlusion"; color: "White" } - ListElement { text: "Debug Scattering"; color: "White" } - ListElement { text: "Ambient Occlusion"; color: "White" } - ListElement { text: "Ambient Occlusion Blurred"; color: "White" } - ListElement { text: "Custom"; color: "White" } } - width: 200 - onCurrentIndexChanged: { framebuffer.setDebugMode(currentIndex) } + Column { + spacing: 10 + HifiControls.CheckBox { + boxSize: 20 + text: "Metas" + checked: render.mainViewTask.getConfig("DrawMetaBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawMetaBounds")["enabled"] = checked } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Lights" + checked: render.mainViewTask.getConfig("DrawLightBounds")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("DrawLightBounds")["enabled"] = checked; } + } + HifiControls.CheckBox { + boxSize: 20 + text: "Zones" + checked: render.mainViewTask.getConfig("DrawZones")["enabled"] + onCheckedChanged: { render.mainViewTask.getConfig("ZoneRenderer")["enabled"] = checked; render.mainViewTask.getConfig("DrawZones")["enabled"] = checked; } + } + } } } - - Row { - Column { - - CheckBox { - text: "Opaques" - checked: mainViewTask.getConfig("DrawOpaqueBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawOpaqueBounds")["enabled"] = checked } - } - CheckBox { - text: "Transparents" - checked: mainViewTask.getConfig("DrawTransparentBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawTransparentBounds")["enabled"] = checked } - } - CheckBox { - text: "Opaques in Front" - checked: mainViewTask.getConfig("DrawOverlayInFrontOpaqueBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawOverlayInFrontOpaqueBounds")["enabled"] = checked } - } - CheckBox { - text: "Transparents in Front" - checked: mainViewTask.getConfig("DrawOverlayInFrontTransparentBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawOverlayInFrontTransparentBounds")["enabled"] = checked } - } - CheckBox { - text: "Opaques in HUD" - checked: mainViewTask.getConfig("DrawOverlayHUDOpaqueBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawOverlayHUDOpaqueBounds")["enabled"] = checked } - } - CheckBox { - text: "Transparents in HUD" - checked: mainViewTask.getConfig("DrawOverlayHUDTransparentBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawOverlayHUDTransparentBounds")["enabled"] = checked } - } - - } - Column { - CheckBox { - text: "Metas" - checked: mainViewTask.getConfig("DrawMetaBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawMetaBounds")["enabled"] = checked } - } - CheckBox { - text: "Lights" - checked: mainViewTask.getConfig("DrawLightBounds")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("DrawLightBounds")["enabled"] = checked; } - } - CheckBox { - text: "Zones" - checked: mainViewTask.getConfig("DrawZones")["enabled"] - onCheckedChanged: { mainViewTask.getConfig("ZoneRenderer")["enabled"] = checked; mainViewTask.getConfig("DrawZones")["enabled"] = checked; } - } - } - } } - diff --git a/scripts/developer/utilities/render/luci.js b/scripts/developer/utilities/render/luci.js new file mode 100644 index 0000000000..3e0beb2181 --- /dev/null +++ b/scripts/developer/utilities/render/luci.js @@ -0,0 +1,98 @@ +"use strict"; + +// +// Luci.js +// tablet-engine app +// +// Copyright 2017 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +(function() { + var TABLET_BUTTON_NAME = "LUCI"; + var QMLAPP_URL = Script.resolvePath("./deferredLighting.qml"); + + + var onLuciScreen = false; + + function onClicked() { + if (onLuciScreen) { + tablet.gotoHomeScreen(); + } else { + tablet.loadQMLSource(QMLAPP_URL); + } + } + + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + var button = tablet.addButton({ + text: TABLET_BUTTON_NAME, + sortOrder: 1 + }); + + var hasEventBridge = false; + + function wireEventBridge(on) { + if (!tablet) { + print("Warning in wireEventBridge(): 'tablet' undefined!"); + return; + } + if (on) { + if (!hasEventBridge) { + tablet.fromQml.connect(fromQml); + hasEventBridge = true; + } + } else { + if (hasEventBridge) { + tablet.fromQml.disconnect(fromQml); + hasEventBridge = false; + } + } + } + + function onScreenChanged(type, url) { + if (url === QMLAPP_URL) { + onLuciScreen = true; + } else { + onLuciScreen = false; + } + + button.editProperties({isActive: onLuciScreen}); + wireEventBridge(onLuciScreen); + } + + function fromQml(message) { + } + + button.clicked.connect(onClicked); + tablet.screenChanged.connect(onScreenChanged); + + var moveDebugCursor = false; + Controller.mousePressEvent.connect(function (e) { + if (e.isMiddleButton) { + moveDebugCursor = true; + setDebugCursor(e.x, e.y); + } + }); + Controller.mouseReleaseEvent.connect(function() { moveDebugCursor = false; }); + Controller.mouseMoveEvent.connect(function (e) { if (moveDebugCursor) setDebugCursor(e.x, e.y); }); + + + Script.scriptEnding.connect(function () { + if (onLuciScreen) { + tablet.gotoHomeScreen(); + } + button.clicked.disconnect(onClicked); + tablet.screenChanged.disconnect(onScreenChanged); + tablet.removeButton(button); + }); + + function setDebugCursor(x, y) { + nx = (x / Window.innerWidth); + ny = 1.0 - ((y) / (Window.innerHeight - 32)); + + Render.getConfig("RenderMainView").getConfig("Antialiasing").debugCursorTexcoord = { x: nx, y: ny }; + } + +}()); \ No newline at end of file From 18287ed45bfa47d68c70412861b752212511d7d1 Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Fri, 13 Oct 2017 01:06:40 -0700 Subject: [PATCH 04/10] Banging my head against qml... --- .../utilities/lib/configprop/ConfigSlider.qml | 29 ++++++++------- .../hifi-qml/styles-uit/FiraSansSemiBold.qmlc | Bin 4097 -> 0 bytes .../lib/hifi-qml/styles-uit/HiFiGlyphs.qmlc | Bin 4897 -> 0 bytes .../hifi-qml/styles-uit/HifiConstants.qmlc | Bin 51320 -> 0 bytes .../hifi-qml/styles-uit/RalewaySemiBold.qmlc | Bin 4081 -> 0 bytes .../lib/hifi-qml/styles-uit/Separator.qmlc | Bin 6855 -> 0 bytes .../utilities/render/deferredLighting.qml | 35 +++++++++++++++--- 7 files changed, 46 insertions(+), 18 deletions(-) delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qmlc delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qmlc delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qmlc diff --git a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml index 516193b81c..f82b381a2d 100644 --- a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml +++ b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml @@ -9,16 +9,19 @@ // import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.3 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 import "../hifi-qml/styles-uit" import "../hifi-qml/controls-uit" as HifiControls Item { + HifiConstants { id: luci } id: root - width: 400 + + anchors.left: parent.left + anchors.right: parent.right height: 24 property bool integral: false property var config @@ -36,19 +39,19 @@ Item { HifiControls.Label { id: labelControl text: root.label + enabled: true anchors.left: root.left - anchors.leftMargin: 8 - anchors.top: root.top - anchors.topMargin: 7 + anchors.right: root.horizontalCenter + anchors.verticalCenter: root.verticalCenter + //anchors.topMargin: 7 } HifiControls.Label { id: labelValue text: sliderControl.value.toFixed(root.integral ? 0 : 2) anchors.right: root.right - anchors.rightMargin: 8 - anchors.top: root.top - anchors.topMargin: 15 + anchors.bottom: root.bottom + anchors.bottomMargin: 0 } Binding { @@ -62,11 +65,11 @@ Item { HifiControls.Slider { id: sliderControl stepSize: root.integral ? 1.0 : 0.0 - width: root.width-130 - height: 20 + //height: 20 + anchors.left: root.horizontalCenter anchors.right: root.right - anchors.rightMargin: 8 + anchors.rightMargin: 0 anchors.top: root.top - anchors.topMargin: 3 + anchors.topMargin: 0 } } diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qmlc deleted file mode 100644 index 62898a891eb53784c3db5fba53a950848e4ef57a..0000000000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pa=oL-|uHqp`Y9C}|Vd3Ds69 zBCZKY7AIiYA=h(N6!)$bB>X~-*1 z@_9`vvc}OPuS@5m>B~RAFPyIkb%7 diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qmlc deleted file mode 100644 index 686f84ad173d629beb11885bdba32232ee46d480..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 51320 zcmeI53!Gd7k9Jr|NL&<>aL!d?inJu z$$mWfbb8J`Ri~;>ojP^uRNd-Tt0ymMT-3SfG{BsA96y@*+f!~eQ1==*>zqH{dD}f7 z|H@5=AN|93@Bi`p|JA^c4P5j5KfLLb*YAJshK`0WpZ<;4{Q4z8pMh=D;Cx^U9&RwD z-whcaz7H6%z`duziNHgu1f=vGN^7CP!VV?ML46K-a*!VdH;jV&M#1Bwp!zs?({b?d zagZDjD~^X<$3w#ju;T<^G}MoVp3%@h8mdnOcOvwi2oq0&?vr5ONsycjZ6`zT$&eod z4P#)(7~mABKLvVDf&NpV`c$~@RCxSUm@yXa9Siw9yeSWl^syqeBVY}ZeZTHT??`{R^MI9@AfkMZl|Flzw3aRK=Q^?eyhsxYhhnSe)EB= zmG`eo`DNWzXlH0|CrL$q6M-s?tBhZz{yFJS=%0bm@FxG{flN=|o+SwN4&QHOpVYQ2 zB!BHm&&~L}BTE_bhwr!1H;7N%?=J=}&D_`RzP zzb#B0)K4*Vzqyppd&=;62h|n%^!$y_7}~e344?O=mar6tYG3bLe45a{zb(V>{X>kq z82Vf(pY3J%e29F-_VG5K@jtWtpD4rU!^4c*sgRD1pqQ1$#WSA5adD*3oeiMtGd=rM znRb7aJ{$MrKnR1RFPmHgznx|HZO4s>U-dnnLE!h9GWQ>KO%m;*?pBy2-n+3YQzO)u z?)R1Q`*In6pC%bmd;8vB%5P5@emmJQqW-P^Kq2q~9p@shaUKxI07-9W-K2}=4hs*H$;t0oYm?%U2 zeprUzmuM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n*4*TW%=1;TaF?^+3V{vmUtUfjJM%%Y8S@b;BK9EI{Sx5C(^s zAxVt4O(+W2FvA4MU~rZR;$#?7T84S_A%sDkNi{>xB?;mrIY|OT?cp;d8N(nUXEPwq zEYqZwr3^_@OyOgk6lr`_+U8m172?D&h%&`Vg}}rs&oL5eUdF;Jc@&J}3LQv0ZM>dc zTUZPyNMT@*Vp5$A8_&0Eqw25y%_vdQoFvJVLikiuJdI|X^*Ba~3FUPw@w98JqbdoK zjFYV7Ygr?sIC_F88R8ryO_Z}7CP9=jQk+4KJ1fV7R<Psk?(D z6&GeWL7;*~_!T2fl4%Sw1Q;XEY2wP$Y2u^_FoQu-ts_@qVn99FEe&ysNhazrHo#%x zOslL!RgTjPTQfvtA4)u?6sKn~@F`>|g#oq!v+QLL$JoPehAcFO^7I&SrWhlsxG7^3 zOe;O9xo;`YO*s(oDV&>J4CiJ_p|8xbf6AfU52N|7B_lVaP=s>r z{!sR2*GTqvN6&>n%H{HC&aM^8E(GOGI6qSg=O-7#`S?;Wdo%Lpx677(`>9+mv-_7y(&uY3cdfTzi1j* zvJ4!^zvew~;m4i}vaOZ1Y7-;Z)kK>ispB?7@_8mmDu$i~!n;c2!Jeu4@nFxn`S7k% zD7z48FBy77_&K>c{Bs^6fW-ESMJ$g27AsP?1&hVg!k`;q)_w-E8c^&|OK fvyu7#ezcbJuQY=C^`aSnAHRMy@NnYwfcnwDIQ;JV diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index 1cf88ec5ac..7ab7342605 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -16,19 +16,43 @@ import "../lib/hifi-qml/controls-uit" as HifiControls import "../lib/configprop" Rectangle { - id: render; HifiConstants { id: hifi;} + id: render; + anchors.margins: hifi.dimensions.contentMargin.x + color: hifi.colors.baseGray; property var mainViewTask: Render.getConfig("RenderMainView") - + + Row { + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 10 Column { - spacing: 10 - + padding: 10 + spacing: 5 + + // width: parent.width + anchors.left: parent.left + anchors.right: parent.right + // padding: hifi.dimensions.contentMargin.x + + ConfigSlider { + label: qsTr("ToneMapping") + integral: false + config: render.mainViewTask.getConfig("ToneMapping") + property: "exposure" + max: 2 + min: 0 + + anchors.left: parent.left + anchors.right: parent.right + } + Row { spacing: 20 padding: 10 - Column { + Column { spacing: 10 Repeater { model: [ @@ -249,4 +273,5 @@ Rectangle { } } } + } } From 79338f43162963839d5891567d721ddf19360515 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 26 Oct 2017 17:12:49 -0700 Subject: [PATCH 05/10] removing the the unecessary files and trying using qrc:///qml --- .../utilities/lib/configprop/ConfigSlider.qml | 4 +- .../lib/hifi-qml/controls-uit/Button.qml | 73 ---- .../lib/hifi-qml/controls-uit/CheckBox.qml | 101 ------ .../lib/hifi-qml/controls-uit/ComboBox.qml | 249 ------------- .../hifi-qml/controls-uit/ConfigSlider.qml | 72 ---- .../hifi-qml/controls-uit/ContentSection.qml | 138 ------- .../lib/hifi-qml/controls-uit/GlyphButton.qml | 78 ---- .../hifi-qml/controls-uit/HorizontalRule.qml | 20 - .../controls-uit/HorizontalSpacer.qml | 21 -- .../lib/hifi-qml/controls-uit/Label.qml | 22 -- .../hifi-qml/controls-uit/QueuedButton.qml | 43 --- .../lib/hifi-qml/controls-uit/RadioButton.qml | 71 ---- .../lib/hifi-qml/controls-uit/Separator.qml | 38 -- .../lib/hifi-qml/controls-uit/Slider.qml | 98 ----- .../lib/hifi-qml/controls-uit/SpinBox.qml | 117 ------ .../lib/hifi-qml/controls-uit/Switch.qml | 156 -------- .../lib/hifi-qml/controls-uit/Table.qml | 179 --------- .../hifi-qml/controls-uit/VerticalSpacer.qml | 21 -- .../styles-uit/AnonymousProRegular.qml | 23 -- .../lib/hifi-qml/styles-uit/ButtonLabel.qml | 18 - .../hifi-qml/styles-uit/FiraSansRegular.qml | 23 -- .../hifi-qml/styles-uit/FiraSansSemiBold.qml | 23 -- .../lib/hifi-qml/styles-uit/HiFiGlyphs.qml | 25 -- .../lib/hifi-qml/styles-uit/HifiConstants.qml | 342 ------------------ .../lib/hifi-qml/styles-uit/IconButton.qml | 20 - .../lib/hifi-qml/styles-uit/InfoItem.qml | 19 - .../lib/hifi-qml/styles-uit/InputLabel.qml | 18 - .../lib/hifi-qml/styles-uit/ListItem.qml | 18 - .../lib/hifi-qml/styles-uit/Logs.qml | 18 - .../lib/hifi-qml/styles-uit/OverlayTitle.qml | 18 - .../lib/hifi-qml/styles-uit/RalewayBold.qml | 24 -- .../lib/hifi-qml/styles-uit/RalewayLight.qml | 23 -- .../hifi-qml/styles-uit/RalewayRegular.qml | 23 -- .../hifi-qml/styles-uit/RalewaySemiBold.qml | 23 -- .../lib/hifi-qml/styles-uit/SectionName.qml | 19 - .../lib/hifi-qml/styles-uit/Separator.qml | 41 --- .../lib/hifi-qml/styles-uit/ShortcutText.qml | 18 - .../lib/hifi-qml/styles-uit/TabName.qml | 19 - .../hifi-qml/styles-uit/TextFieldInput.qml | 18 - .../utilities/render/deferredLighting.qml | 4 +- 40 files changed, 4 insertions(+), 2274 deletions(-) delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/IconButton.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/InfoItem.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/InputLabel.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ListItem.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Logs.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/OverlayTitle.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayBold.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayLight.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayRegular.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/SectionName.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml delete mode 100644 scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml diff --git a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml index f82b381a2d..bb46536fdc 100644 --- a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml +++ b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml @@ -12,8 +12,8 @@ import QtQuick 2.7 import QtQuick.Controls 1.4 as Original import QtQuick.Controls.Styles 1.4 -import "../hifi-qml/styles-uit" -import "../hifi-qml/controls-uit" as HifiControls +import "qrc:///qml/styles-uit" +import "qrc:///qml/controls-uit" as HifiControls Item { diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml deleted file mode 100644 index 59f8a63238..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Button.qml +++ /dev/null @@ -1,73 +0,0 @@ -// -// Button.qml -// -// Created by David Rowe on 16 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" - -Original.Button { - property int color: 0 - property int colorScheme: hifi.colorSchemes.light - - width: 120 - height: hifi.dimensions.controlLineHeight - - HifiConstants { id: hifi } - - style: ButtonStyle { - - background: Rectangle { - radius: hifi.buttons.radius - - gradient: Gradient { - GradientStop { - position: 0.2 - color: { - if (!control.enabled) { - hifi.buttons.disabledColorStart[control.colorScheme] - } else if (control.pressed) { - hifi.buttons.pressedColor[control.color] - } else if (control.hovered) { - hifi.buttons.hoveredColor[control.color] - } else { - hifi.buttons.colorStart[control.color] - } - } - } - GradientStop { - position: 1.0 - color: { - if (!control.enabled) { - hifi.buttons.disabledColorFinish[control.colorScheme] - } else if (control.pressed) { - hifi.buttons.pressedColor[control.color] - } else if (control.hovered) { - hifi.buttons.hoveredColor[control.color] - } else { - hifi.buttons.colorFinish[control.color] - } - } - } - } - } - - label: RalewayBold { - font.capitalization: Font.AllUppercase - color: enabled ? hifi.buttons.textColor[control.color] - : hifi.buttons.disabledTextColor[control.colorScheme] - size: hifi.fontSizes.buttonLabel - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - text: control.text - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml deleted file mode 100644 index b279b7ca8d..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/CheckBox.qml +++ /dev/null @@ -1,101 +0,0 @@ -// -// CheckBox.qml -// -// Created by David Rowe on 26 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" - -Original.CheckBox { - id: checkBox - - property int colorScheme: hifi.colorSchemes.light - property string color: hifi.colors.lightGrayText - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - property bool isRedCheck: false - property int boxSize: 14 - property int boxRadius: 3 - property bool wrap: true; - readonly property int checkSize: Math.max(boxSize - 8, 10) - readonly property int checkRadius: 2 - activeFocusOnPress: true - - style: CheckBoxStyle { - indicator: Rectangle { - id: box - width: boxSize - height: boxSize - radius: boxRadius - border.width: 1 - border.color: pressed || hovered - ? hifi.colors.checkboxCheckedBorder - : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) - - gradient: Gradient { - GradientStop { - position: 0.2 - color: pressed || hovered - ? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightStart) - : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart) - } - GradientStop { - position: 1.0 - color: pressed || hovered - ? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightFinish) - : (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) - } - } - - Rectangle { - visible: pressed || hovered - anchors.centerIn: parent - id: innerBox - width: checkSize - 4 - height: width - radius: checkRadius - color: hifi.colors.checkboxCheckedBorder - } - - Rectangle { - id: check - width: checkSize - height: checkSize - radius: checkRadius - anchors.centerIn: parent - color: isRedCheck ? hifi.colors.checkboxCheckedRed : hifi.colors.checkboxChecked - border.width: 2 - border.color: isRedCheck? hifi.colors.checkboxCheckedBorderRed : hifi.colors.checkboxCheckedBorder - visible: checked && !pressed || !checked && pressed - } - - Rectangle { - id: disabledOverlay - visible: !enabled - width: boxSize - height: boxSize - radius: boxRadius - border.width: 1 - border.color: hifi.colors.baseGrayHighlight - color: hifi.colors.baseGrayHighlight - opacity: 0.5 - } - } - - label: Label { - text: control.text - color: control.color - x: 2 - wrapMode: checkBox.wrap ? Text.Wrap : Text.NoWrap - elide: checkBox.wrap ? Text.ElideNone : Text.ElideRight - enabled: checkBox.enabled - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml deleted file mode 100644 index d672fa6387..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ComboBox.qml +++ /dev/null @@ -1,249 +0,0 @@ -// -// ComboBox.qml -// -// Created by Bradley Austin David on 27 Jan 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "../controls-uit" as HifiControls - -FocusScope { - id: root - HifiConstants { id: hifi } - - property alias model: comboBox.model; - property alias editable: comboBox.editable - property alias comboBox: comboBox - readonly property alias currentText: comboBox.currentText; - property alias currentIndex: comboBox.currentIndex; - - property int dropdownHeight: 480 - property int colorScheme: hifi.colorSchemes.light - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - property string label: "" - property real controlHeight: height + (comboBoxLabel.visible ? comboBoxLabel.height + comboBoxLabel.anchors.bottomMargin : 0) - - readonly property ComboBox control: comboBox - - property bool isDesktop: true - - signal accepted(); - - implicitHeight: comboBox.height; - focus: true - - Rectangle { - id: background - gradient: Gradient { - GradientStop { - position: 0.2 - color: popup.visible - ? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) - : (isLightColorScheme ? hifi.colors.dropDownLightStart : hifi.colors.dropDownDarkStart) - } - GradientStop { - position: 1.0 - color: popup.visible - ? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) - : (isLightColorScheme ? hifi.colors.dropDownLightFinish : hifi.colors.dropDownDarkFinish) - } - } - anchors.fill: parent - } - - SystemPalette { id: palette } - - ComboBox { - id: comboBox - anchors.fill: parent - visible: false - height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control. - } - - FiraSansSemiBold { - id: textField - anchors { - left: parent.left - leftMargin: hifi.dimensions.textPadding - right: dropIcon.left - verticalCenter: parent.verticalCenter - } - size: hifi.fontSizes.textFieldInput - text: comboBox.currentText - elide: Text.ElideRight - color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText ) - } - - Item { - id: dropIcon - anchors { right: parent.right; verticalCenter: parent.verticalCenter } - height: background.height - width: height - Rectangle { - width: 1 - height: parent.height - anchors.top: parent.top - anchors.left: parent.left - color: isLightColorScheme ? hifi.colors.faintGray : hifi.colors.baseGray - } - HiFiGlyphs { - anchors { - top: parent.top - topMargin: -11 - horizontalCenter: parent.horizontalCenter - } - size: hifi.dimensions.spinnerSize - text: hifi.glyphs.caratDn - color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText) - } - } - - MouseArea { - id: controlHover - hoverEnabled: true - anchors.fill: parent - onClicked: toggleList(); - } - - function toggleList() { - if (popup.visible) { - hideList(); - } else { - showList(); - } - } - - function showList() { - var r; - if (isDesktop) { - r = desktop.mapFromItem(root, 0, 0, root.width, root.height); - } else { - r = mapFromItem(root, 0, 0, root.width, root.height); - } - var y = r.y + r.height; - var bottom = y + scrollView.height; - var height = isDesktop ? desktop.height : tabletRoot.height; - if (bottom > height) { - y -= bottom - height + 8; - } - scrollView.x = r.x; - scrollView.y = y; - popup.visible = true; - popup.forceActiveFocus(); - listView.currentIndex = root.currentIndex; - scrollView.hoverEnabled = true; - } - - function hideList() { - popup.visible = false; - scrollView.hoverEnabled = false; - root.accepted(); - } - - FocusScope { - id: popup - parent: isDesktop ? desktop : root - anchors.fill: parent - z: isDesktop ? desktop.zLevels.menu : 12 - visible: false - focus: true - - MouseArea { - anchors.fill: parent - onClicked: hideList(); - } - - function previousItem() { listView.currentIndex = (listView.currentIndex + listView.count - 1) % listView.count; } - function nextItem() { listView.currentIndex = (listView.currentIndex + listView.count + 1) % listView.count; } - function selectCurrentItem() { root.currentIndex = listView.currentIndex; hideList(); } - function selectSpecificItem(index) { root.currentIndex = index; hideList(); } - - Keys.onUpPressed: previousItem(); - Keys.onDownPressed: nextItem(); - Keys.onSpacePressed: selectCurrentItem(); - Keys.onRightPressed: selectCurrentItem(); - Keys.onReturnPressed: selectCurrentItem(); - Keys.onEscapePressed: hideList(); - - ScrollView { - id: scrollView - height: root.dropdownHeight - width: root.width + 4 - property bool hoverEnabled: false; - - style: ScrollViewStyle { - decrementControl: Item { - visible: false - } - incrementControl: Item { - visible: false - } - scrollBarBackground: Rectangle{ - implicitWidth: 20 - color: hifi.colors.baseGray - } - - handle: - Rectangle { - implicitWidth: 16 - anchors.left: parent.left - anchors.leftMargin: 3 - anchors.top: parent.top - anchors.bottom: parent.bottom - radius: 6 - color: hifi.colors.lightGrayText - } - } - - ListView { - id: listView - height: textField.height * count * 1.4 - model: root.model - delegate: Rectangle { - width: root.width + 4 - height: popupText.implicitHeight * 1.4 - color: (listView.currentIndex === index) ? hifi.colors.primaryHighlight : - (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark) - FiraSansSemiBold { - anchors.left: parent.left - anchors.leftMargin: hifi.dimensions.textPadding - anchors.verticalCenter: parent.verticalCenter - id: popupText - text: listView.model[index] ? listView.model[index] : (listView.model.get && listView.model.get(index).text ? listView.model.get(index).text : "") - size: hifi.fontSizes.textFieldInput - color: hifi.colors.baseGray - } - MouseArea { - id: popupHover - anchors.fill: parent; - hoverEnabled: scrollView.hoverEnabled; - onEntered: listView.currentIndex = index; - onClicked: popup.selectSpecificItem(index); - } - } - } - } - } - - HifiControls.Label { - id: comboBoxLabel - text: root.label - colorScheme: root.colorScheme - anchors.left: parent.left - anchors.bottom: parent.top - anchors.bottomMargin: 4 - visible: label != "" - } - - Component.onCompleted: { - isDesktop = (typeof desktop !== "undefined"); - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml deleted file mode 100644 index 9c38b66ed8..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ConfigSlider.qml +++ /dev/null @@ -1,72 +0,0 @@ -// -// ConfigSlider.qml -// examples/utilities/tools/render -// -// Created by Zach Pomerantz on 2/8/2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "../controls-uit" as HifiControls - -Item { - id: root - width: 400 - height: 24 - property bool integral: false - property var config - property string property - property alias label: labelControl.text - property alias min: sliderControl.minimumValue - property alias max: sliderControl.maximumValue - - Component.onCompleted: { - // Binding favors qml value, so set it first - sliderControl.value = root.config[root.property]; - bindingControl.when = true; - } - - HifiControls.Label { - id: labelControl - text: root.label - anchors.left: root.left - anchors.leftMargin: 8 - anchors.top: root.top - anchors.topMargin: 7 - } - - HifiControls.Label { - id: labelValue - text: sliderControl.value.toFixed(root.integral ? 0 : 2) - anchors.right: root.right - anchors.rightMargin: 8 - anchors.top: root.top - anchors.topMargin: 15 - } - - Binding { - id: bindingControl - target: root.config - property: root.property - value: sliderControl.value - when: false - } - - HifiControls.Slider { - id: sliderControl - stepSize: root.integral ? 1.0 : 0.0 - width: root.width-130 - height: 20 - anchors.right: root.right - anchors.rightMargin: 8 - anchors.top: root.top - anchors.topMargin: 3 - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml deleted file mode 100644 index 47a13e9262..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/ContentSection.qml +++ /dev/null @@ -1,138 +0,0 @@ -// -// ContentSection.qml -// -// Created by David Rowe on 16 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtGraphicalEffects 1.0 - -import "../styles-uit" - -Column { - property string name: "Content Section" - property bool isFirst: false - property bool isCollapsible: false // Set at creation. - property bool isCollapsed: false - - spacing: 0 // Defer spacing decisions to individual controls. - - anchors { - left: parent.left - leftMargin: hifi.dimensions.contentMargin.x - right: parent.right - rightMargin: hifi.dimensions.contentMargin.x - } - - function toggleCollapsed() { - if (isCollapsible) { - isCollapsed = !isCollapsed; - for (var i = 1; i < children.length; i++) { - children[i].visible = !isCollapsed; - } - } - } - - Item { - id: sectionName - anchors.left: parent.left - anchors.right: parent.right - height: leadingSpace.height + topBar.height + heading.height + bottomBar.height - - Item { - id: leadingSpace - width: 1 - height: isFirst ? 7 : 0 - anchors.top: parent.top - } - - Item { - id: topBar - visible: !isFirst - height: visible ? 2 : 0 - anchors.top: leadingSpace.bottom - - Rectangle { - id: shadow - width: frame.width - height: 1 - color: hifi.colors.baseGrayShadow - x: -hifi.dimensions.contentMargin.x - } - - Rectangle { - width: frame.width - height: 1 - color: hifi.colors.baseGrayHighlight - x: -hifi.dimensions.contentMargin.x - anchors.top: shadow.bottom - } - } - - Item { - id: heading - anchors { - left: parent.left - right: parent.right - top: topBar.bottom - } - height: isCollapsible ? 36 : 28 - - RalewayRegular { - id: title - anchors { - left: parent.left - top: parent.top - topMargin: 12 - } - size: hifi.fontSizes.sectionName - font.capitalization: Font.AllUppercase - text: name - color: hifi.colors.lightGrayText - } - - HiFiGlyphs { - anchors { - top: title.top - topMargin: -9 - right: parent.right - rightMargin: -4 - } - size: hifi.fontSizes.disclosureButton - text: isCollapsed ? hifi.glyphs.disclosureButtonExpand : hifi.glyphs.disclosureButtonCollapse - color: hifi.colors.lightGrayText - visible: isCollapsible - } - - MouseArea { - // Events are propogated so that any active control is defocused. - anchors.fill: parent - propagateComposedEvents: true - onPressed: { - toggleCollapsed(); - mouse.accepted = false; - } - } - } - - LinearGradient { - id: bottomBar - visible: desktop.gradientsSupported && isCollapsible - width: frame.width - height: visible ? 4 : 0 - x: -hifi.dimensions.contentMargin.x - anchors.top: heading.bottom - start: Qt.point(0, 0) - end: Qt.point(0, 4) - gradient: Gradient { - GradientStop { position: 0.0; color: hifi.colors.darkGray } - GradientStop { position: 1.0; color: hifi.colors.baseGray } // Equivalent of darkGray0 over baseGray background. - } - cached: true - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml deleted file mode 100644 index ac353b5a52..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/GlyphButton.qml +++ /dev/null @@ -1,78 +0,0 @@ -// -// GlyphButton.qml -// -// Created by Clement on 3/7/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" - -Original.Button { - property int color: 0 - property int colorScheme: hifi.colorSchemes.light - property string glyph: "" - property int size: 32 - - width: 120 - height: 28 - - style: ButtonStyle { - - background: Rectangle { - radius: hifi.buttons.radius - - gradient: Gradient { - GradientStop { - position: 0.2 - color: { - if (!control.enabled) { - hifi.buttons.disabledColorStart[control.colorScheme] - } else if (control.pressed) { - hifi.buttons.pressedColor[control.color] - } else if (control.hovered) { - hifi.buttons.hoveredColor[control.color] - } else { - hifi.buttons.colorStart[control.color] - } - } - } - GradientStop { - position: 1.0 - color: { - if (!control.enabled) { - hifi.buttons.disabledColorFinish[control.colorScheme] - } else if (control.pressed) { - hifi.buttons.pressedColor[control.color] - } else if (control.hovered) { - hifi.buttons.hoveredColor[control.color] - } else { - hifi.buttons.colorFinish[control.color] - } - } - } - } - } - - label: HiFiGlyphs { - color: enabled ? hifi.buttons.textColor[control.color] - : hifi.buttons.disabledTextColor[control.colorScheme] - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors { - // Tweak horizontal alignment so that it looks right. - left: parent.left - leftMargin: -0.5 - } - text: control.glyph - size: control.size - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml deleted file mode 100644 index 425500f1d4..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalRule.qml +++ /dev/null @@ -1,20 +0,0 @@ -// -// HorizontalRule.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Rectangle { - anchors.left: parent.left - anchors.right: parent.right - height: 1 - color: hifi.colors.lightGray -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml deleted file mode 100644 index 545154ab44..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/HorizontalSpacer.qml +++ /dev/null @@ -1,21 +0,0 @@ -// -// HorizontalSpacer.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 - -import "../styles-uit" - -Item { - id: root - property alias size: root.width - - width: hifi.dimensions.controlInterlineHeight - height: 1 // Must be non-zero -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml deleted file mode 100644 index 330d74fa14..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Label.qml +++ /dev/null @@ -1,22 +0,0 @@ -// -// Label.qml -// -// Created by David Rowe on 26 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 - -import "../styles-uit" - -RalewaySemiBold { - HifiConstants { id: hifi } - property int colorScheme: hifi.colorSchemes.light - - size: hifi.fontSizes.inputLabel - color: enabled ? (colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGray : hifi.colors.lightGrayText) - : (colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight); -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml deleted file mode 100644 index 36ffbe582f..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/QueuedButton.qml +++ /dev/null @@ -1,43 +0,0 @@ -// -// QueuedButton.qml -// -- original Button.qml + signal timer workaround --ht -// Created by David Rowe on 16 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "." as HifiControls - -HifiControls.Button { - // FIXME: THIS WORKAROUND MIGRATED/CONSOLIDATED FROM RUNNINGSCRIPTS.QML - - // For some reason trigginer an API that enters - // an internal event loop directly from the button clicked - // trigger below causes the appliction to behave oddly. - // Most likely because the button onClicked handling is never - // completed until the function returns. - // FIXME find a better way of handling the input dialogs that - // doesn't trigger this. - - // NOTE: dialogs that need to use this workaround can connect via - // onQueuedClicked: ... - // instead of: - // onClicked: ... - - signal clickedQueued() - Timer { - id: fromTimer - interval: 5 - repeat: false - running: false - onTriggered: clickedQueued() - } - onClicked: fromTimer.running = true -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml deleted file mode 100644 index ab11ec68b1..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/RadioButton.qml +++ /dev/null @@ -1,71 +0,0 @@ -// -// RadioButton.qml -// -// Created by Cain Kilgore on 20th July 2017 -// Copyright 2017 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "../controls-uit" as HifiControls - -Original.RadioButton { - id: radioButton - HifiConstants { id: hifi } - - property int colorScheme: hifi.colorSchemes.light - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - - readonly property int boxSize: 14 - readonly property int boxRadius: 3 - readonly property int checkSize: 10 - readonly property int checkRadius: 2 - - style: RadioButtonStyle { - indicator: Rectangle { - id: box - width: boxSize - height: boxSize - radius: 7 - gradient: Gradient { - GradientStop { - position: 0.2 - color: pressed || hovered - ? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkStart : hifi.colors.checkboxLightStart) - : (radioButton.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart) - } - GradientStop { - position: 1.0 - color: pressed || hovered - ? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkFinish : hifi.colors.checkboxLightFinish) - : (radioButton.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish) - } - } - - Rectangle { - id: check - width: checkSize - height: checkSize - radius: 7 - anchors.centerIn: parent - color: "#00B4EF" - border.width: 1 - border.color: "#36CDFF" - visible: checked && !pressed || !checked && pressed - } - } - - label: RalewaySemiBold { - text: control.text - size: hifi.fontSizes.inputLabel - color: isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText - x: radioButton.boxSize / 2 - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml deleted file mode 100644 index 5a775221f6..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Separator.qml +++ /dev/null @@ -1,38 +0,0 @@ -// -// Separator.qml -// -// Created by Zach Fox on 2017-06-06 -// Copyright 2017 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import "../styles-uit" - -Item { - // Size - height: 2; - Rectangle { - // Size - width: parent.width; - height: 1; - // Anchors - anchors.left: parent.left; - anchors.bottom: parent.bottom; - anchors.bottomMargin: height; - // Style - color: hifi.colors.baseGrayShadow; - } - Rectangle { - // Size - width: parent.width; - height: 1; - // Anchors - anchors.left: parent.left; - anchors.bottom: parent.bottom; - // Style - color: hifi.colors.baseGrayHighlight; - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml deleted file mode 100644 index 89bae9bcde..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Slider.qml +++ /dev/null @@ -1,98 +0,0 @@ -// -// Slider.qml -// -// Created by David Rowe on 27 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "../controls-uit" as HifiControls - -Slider { - id: slider - - property int colorScheme: hifi.colorSchemes.light - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - property string label: "" - property real controlHeight: height + (sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0) - - height: hifi.fontSizes.textFieldInput + 14 // Match height of TextField control. - y: sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0 - - style: SliderStyle { - - groove: Rectangle { - implicitWidth: 50 - implicitHeight: hifi.dimensions.sliderGrooveHeight - radius: height / 2 - color: isLightColorScheme ? hifi.colors.sliderGutterLight : hifi.colors.sliderGutterDark - - Rectangle { - width: parent.height - 2 - height: slider.width * (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue) - 1 - radius: height / 2 - anchors { - top: parent.top - topMargin: width + 1 - left: parent.left - leftMargin: 1 - } - transformOrigin: Item.TopLeft - rotation: -90 - gradient: Gradient { - GradientStop { position: 0.0; color: hifi.colors.blueAccent } - GradientStop { position: 1.0; color: hifi.colors.primaryHighlight } - } - } - } - - handle: Rectangle { - implicitWidth: hifi.dimensions.sliderHandleSize - implicitHeight: hifi.dimensions.sliderHandleSize - radius: height / 2 - border.width: 1 - border.color: isLightColorScheme ? hifi.colors.sliderBorderLight : hifi.colors.sliderBorderDark - gradient: Gradient { - GradientStop { - position: 0.0 - color: pressed || hovered - ? (isLightColorScheme ? hifi.colors.sliderDarkStart : hifi.colors.sliderLightStart ) - : (isLightColorScheme ? hifi.colors.sliderLightStart : hifi.colors.sliderDarkStart ) - } - GradientStop { - position: 1.0 - color: pressed || hovered - ? (isLightColorScheme ? hifi.colors.sliderDarkFinish : hifi.colors.sliderLightFinish ) - : (isLightColorScheme ? hifi.colors.sliderLightFinish : hifi.colors.sliderDarkFinish ) - } - } - - Rectangle { - height: parent.height - 2 - width: height - radius: height / 2 - anchors.centerIn: parent - color: hifi.colors.transparent - border.width: 1 - border.color: hifi.colors.black - } - } - } - - HifiControls.Label { - id: sliderLabel - text: slider.label - colorScheme: slider.colorScheme - anchors.left: parent.left - anchors.bottom: parent.top - anchors.bottomMargin: 2 - visible: label != "" - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml deleted file mode 100644 index a1237d4bc7..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/SpinBox.qml +++ /dev/null @@ -1,117 +0,0 @@ -// -// SpinBox.qml -// -// Created by David Rowe on 26 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" -import "../controls-uit" as HifiControls - -SpinBox { - id: spinBox - - property int colorScheme: hifi.colorSchemes.light - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - property string label: "" - property string labelInside: "" - property color colorLabelInside: hifi.colors.white - property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0) - - FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } - font.family: firaSansSemiBold.name - font.pixelSize: hifi.fontSizes.textFieldInput - height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control. - - y: spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0 - - style: SpinBoxStyle { - id: spinStyle - background: Rectangle { - color: isLightColorScheme - ? (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGray) - : (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow) - border.color: spinBoxLabelInside.visible ? spinBoxLabelInside.color : hifi.colors.primaryHighlight - border.width: spinBox.activeFocus ? spinBoxLabelInside.visible ? 2 : 1 : 0 - } - - textColor: isLightColorScheme - ? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.lightGray) - : (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText) - selectedTextColor: hifi.colors.black - selectionColor: hifi.colors.primaryHighlight - - horizontalAlignment: Qt.AlignLeft - padding.left: spinBoxLabelInside.visible ? 30 : hifi.dimensions.textPadding - padding.right: hifi.dimensions.spinnerSize - padding.top: 0 - - incrementControl: HiFiGlyphs { - id: incrementButton - text: hifi.glyphs.caratUp - x: 10 - y: 1 - size: hifi.dimensions.spinnerSize - color: styleData.upPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray - } - - decrementControl: HiFiGlyphs { - text: hifi.glyphs.caratDn - x: 10 - y: -1 - size: hifi.dimensions.spinnerSize - color: styleData.downPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray - } - } - - HifiControls.Label { - id: spinBoxLabel - text: spinBox.label - colorScheme: spinBox.colorScheme - anchors.left: parent.left - anchors.bottom: parent.top - anchors.bottomMargin: 4 - visible: label != "" - } - - HifiControls.Label { - id: spinBoxLabelInside - text: spinBox.labelInside - anchors.left: parent.left - anchors.leftMargin: 10 - font.bold: true - anchors.verticalCenter: parent.verticalCenter - color: spinBox.colorLabelInside - visible: spinBox.labelInside != "" - } - - MouseArea { - anchors.fill: parent - propagateComposedEvents: true - onWheel: { - if(spinBox.activeFocus) - wheel.accepted = false - else - wheel.accepted = true - } - onPressed: { - mouse.accepted = false - } - onReleased: { - mouse.accepted = false - } - onClicked: { - mouse.accepted = false - } - onDoubleClicked: { - mouse.accepted = false - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml deleted file mode 100644 index d54f986717..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Switch.qml +++ /dev/null @@ -1,156 +0,0 @@ -// -// Switch.qml -// -// Created by Zach Fox on 2017-06-06 -// Copyright 2017 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" - -Item { - id: rootSwitch; - - property int colorScheme: hifi.colorSchemes.light; - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light; - property int switchWidth: 70; - readonly property int switchRadius: height/2; - property string labelTextOff: ""; - property string labelGlyphOffText: ""; - property int labelGlyphOffSize: 32; - property string labelTextOn: ""; - property string labelGlyphOnText: ""; - property int labelGlyphOnSize: 32; - property alias checked: originalSwitch.checked; - signal onCheckedChanged; - signal clicked; - - Original.Switch { - id: originalSwitch; - activeFocusOnPress: true; - anchors.top: rootSwitch.top; - anchors.left: rootSwitch.left; - anchors.leftMargin: rootSwitch.width/2 - rootSwitch.switchWidth/2; - onCheckedChanged: rootSwitch.onCheckedChanged(); - onClicked: rootSwitch.clicked(); - - style: SwitchStyle { - - padding { - top: 3; - left: 3; - right: 3; - bottom: 3; - } - - groove: Rectangle { - color: "#252525"; - implicitWidth: rootSwitch.switchWidth; - implicitHeight: rootSwitch.height; - radius: rootSwitch.switchRadius; - } - - handle: Rectangle { - id: switchHandle; - implicitWidth: rootSwitch.height - padding.top - padding.bottom; - implicitHeight: implicitWidth; - radius: implicitWidth/2; - border.color: hifi.colors.lightGrayText; - color: hifi.colors.lightGray; - - MouseArea { - anchors.fill: parent; - hoverEnabled: true; - onEntered: parent.color = hifi.colors.blueHighlight; - onExited: parent.color = hifi.colors.lightGray; - } - } - } - } - - // OFF Label - Item { - anchors.right: originalSwitch.left; - anchors.rightMargin: 10; - anchors.top: rootSwitch.top; - height: rootSwitch.height; - - RalewaySemiBold { - id: labelOff; - text: labelTextOff; - size: hifi.fontSizes.inputLabel; - color: originalSwitch.checked ? hifi.colors.lightGrayText : "#FFFFFF"; - anchors.top: parent.top; - anchors.right: parent.right; - width: paintedWidth; - height: parent.height; - verticalAlignment: Text.AlignVCenter; - } - - HiFiGlyphs { - id: labelGlyphOff; - text: labelGlyphOffText; - size: labelGlyphOffSize; - color: labelOff.color; - anchors.top: parent.top; - anchors.topMargin: 2; - anchors.right: labelOff.left; - anchors.rightMargin: 4; - } - - MouseArea { - anchors.top: parent.top; - anchors.bottom: parent.bottom; - anchors.left: labelGlyphOff.left; - anchors.right: labelOff.right; - onClicked: { - originalSwitch.checked = false; - } - } - } - - // ON Label - Item { - anchors.left: originalSwitch.right; - anchors.leftMargin: 10; - anchors.top: rootSwitch.top; - height: rootSwitch.height; - - RalewaySemiBold { - id: labelOn; - text: labelTextOn; - size: hifi.fontSizes.inputLabel; - color: originalSwitch.checked ? "#FFFFFF" : hifi.colors.lightGrayText; - anchors.top: parent.top; - anchors.left: parent.left; - width: paintedWidth; - height: parent.height; - verticalAlignment: Text.AlignVCenter; - } - - HiFiGlyphs { - id: labelGlyphOn; - text: labelGlyphOnText; - size: labelGlyphOnSize; - color: labelOn.color; - anchors.top: parent.top; - anchors.left: labelOn.right; - } - - MouseArea { - anchors.top: parent.top; - anchors.bottom: parent.bottom; - anchors.left: labelOn.left; - anchors.right: labelGlyphOn.right; - onClicked: { - originalSwitch.checked = true; - } - } - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml deleted file mode 100644 index 11d1920f95..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/Table.qml +++ /dev/null @@ -1,179 +0,0 @@ -// -// Table.qml -// -// Created by David Rowe on 18 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -import "../styles-uit" - -TableView { - id: tableView - - property int colorScheme: hifi.colorSchemes.light - readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light - property bool expandSelectedRow: false - property bool centerHeaderText: false - - model: ListModel { } - - headerVisible: false - headerDelegate: Rectangle { - height: hifi.dimensions.tableHeaderHeight - color: isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark - - RalewayRegular { - id: titleText - text: styleData.value - size: hifi.fontSizes.tableHeading - font.capitalization: Font.AllUppercase - color: hifi.colors.baseGrayHighlight - horizontalAlignment: (centerHeaderText ? Text.AlignHCenter : Text.AlignLeft) - anchors { - left: parent.left - leftMargin: hifi.dimensions.tablePadding - right: parent.right - rightMargin: hifi.dimensions.tablePadding - verticalCenter: parent.verticalCenter - } - } - - HiFiGlyphs { - id: titleSort - text: sortIndicatorOrder == Qt.AscendingOrder ? hifi.glyphs.caratUp : hifi.glyphs.caratDn - color: hifi.colors.darkGray - opacity: 0.6; - size: hifi.fontSizes.tableHeadingIcon - anchors { - left: titleText.right - leftMargin: -hifi.fontSizes.tableHeadingIcon / 3 - (centerHeaderText ? 5 : 0) - right: parent.right - rightMargin: hifi.dimensions.tablePadding - verticalCenter: titleText.verticalCenter - } - visible: sortIndicatorVisible && sortIndicatorColumn === styleData.column - } - - Rectangle { - width: 1 - anchors { - left: parent.left - top: parent.top - topMargin: 1 - bottom: parent.bottom - bottomMargin: 2 - } - color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight - visible: styleData.column > 0 - } - - Rectangle { - height: 1 - anchors { - left: parent.left - right: parent.right - bottom: parent.bottom - } - color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight - } - } - - // Use rectangle to draw border with rounded corners. - frameVisible: false - Rectangle { - color: "#00000000" - anchors { fill: parent; margins: -2 } - border.color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight - border.width: 2 - } - anchors.margins: 2 // Shrink TableView to lie within border. - - backgroundVisible: true - - horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff - verticalScrollBarPolicy: Qt.ScrollBarAsNeeded - - style: TableViewStyle { - // Needed in order for rows to keep displaying rows after end of table entries. - backgroundColor: tableView.isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark - alternateBackgroundColor: tableView.isLightColorScheme ? hifi.colors.tableRowLightOdd : hifi.colors.tableRowDarkOdd - - padding.top: headerVisible ? hifi.dimensions.tableHeaderHeight: 0 - - handle: Item { - id: scrollbarHandle - implicitWidth: hifi.dimensions.scrollbarHandleWidth - Rectangle { - anchors { - fill: parent - topMargin: 3 - bottomMargin: 3 // "" - leftMargin: 1 // Move it right - rightMargin: -1 // "" - } - radius: hifi.dimensions.scrollbarHandleWidth/2 - color: isLightColorScheme ? hifi.colors.tableScrollHandleLight : hifi.colors.tableScrollHandleDark - } - } - - scrollBarBackground: Item { - implicitWidth: hifi.dimensions.scrollbarBackgroundWidth - Rectangle { - anchors { - fill: parent - margins: -1 // Expand - topMargin: -1 - } - color: isLightColorScheme ? hifi.colors.tableScrollBackgroundLight : hifi.colors.tableScrollBackgroundDark - - // Extend header color above scrollbar background - Rectangle { - anchors { - top: parent.top - topMargin: -hifi.dimensions.tableHeaderHeight - left: parent.left - right: parent.right - } - height: hifi.dimensions.tableHeaderHeight - color: tableView.isLightColorScheme ? hifi.colors.tableBackgroundLight : hifi.colors.tableBackgroundDark - visible: headerVisible - } - Rectangle { - // Extend header bottom border - anchors { - top: parent.top - left: parent.left - right: parent.right - } - height: 1 - color: isLightColorScheme ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight - visible: headerVisible - } - } - } - - incrementControl: Item { - visible: false - } - - decrementControl: Item { - visible: false - } - } - - rowDelegate: Rectangle { - height: (styleData.selected && expandSelectedRow ? 1.8 : 1) * hifi.dimensions.tableRowHeight - color: styleData.selected - ? hifi.colors.primaryHighlight - : tableView.isLightColorScheme - ? (styleData.alternate ? hifi.colors.tableRowLightEven : hifi.colors.tableRowLightOdd) - : (styleData.alternate ? hifi.colors.tableRowDarkEven : hifi.colors.tableRowDarkOdd) - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml b/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml deleted file mode 100644 index 2df65f1002..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/controls-uit/VerticalSpacer.qml +++ /dev/null @@ -1,21 +0,0 @@ -// -// VerticalSpacer.qml -// -// Created by David Rowe on 16 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 - -import "../styles-uit" - -Item { - id: root - property alias size: root.height - - width: 1 // Must be non-zero - height: hifi.dimensions.controlInterlineHeight -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml deleted file mode 100644 index 789689973b..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/AnonymousProRegular.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// AnonymousProRegular.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: anonymousProRegular; source: "../../fonts/AnonymousPro-Regular.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: anonymousProRegular.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml deleted file mode 100644 index aade5fb439..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ButtonLabel.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// ButtonLabel.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayBold { - font.pixelSize: hifi.fontSizes.buttonLabel -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml deleted file mode 100644 index 4ae0826772..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansRegular.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// FiraSansRegular.qml -// -// Created by David Rowe on 12 May 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: firaSansRegular.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml deleted file mode 100644 index b3f3324090..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/FiraSansSemiBold.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// FiraSansSemiBold.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: firaSansSemiBold; source: pathToFonts + "fonts/FiraSans-SemiBold.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: firaSansSemiBold.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qml deleted file mode 100644 index cbd6fa1d68..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HiFiGlyphs.qml +++ /dev/null @@ -1,25 +0,0 @@ -// -// HiFiGlyphs.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: hiFiGlyphs; source: pathToFonts + "fonts/hifi-glyphs.ttf"; } - property int size: 32 - font.pixelSize: size - width: size - height: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: hiFiGlyphs.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml deleted file mode 100644 index 4a26d11128..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/HifiConstants.qml +++ /dev/null @@ -1,342 +0,0 @@ -// -// HiFiConstants.qml -// -// Created by Bradley Austin Davis on 28 Apr 2015 -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Window 2.2 - -Item { - readonly property alias colors: colors - readonly property alias colorSchemes: colorSchemes - readonly property alias dimensions: dimensions - readonly property alias fontSizes: fontSizes - readonly property alias glyphs: glyphs - readonly property alias icons: icons - readonly property alias buttons: buttons - readonly property alias effects: effects - - function glyphForIcon(icon) { - // Translates icon enum to glyph char. - var glyph; - switch (icon) { - case hifi.icons.information: - glyph = hifi.glyphs.info; - break; - case hifi.icons.question: - glyph = hifi.glyphs.question; - break; - case hifi.icons.warning: - glyph = hifi.glyphs.alert; - break; - case hifi.icons.critical: - glyph = hifi.glyphs.error; - break; - case hifi.icons.placemark: - glyph = hifi.glyphs.placemark; - break; - default: - glyph = hifi.glyphs.noIcon; - } - return glyph; - } - - Item { - id: colors - - // Base colors - readonly property color baseGray: "#393939" - readonly property color darkGray: "#121212" - readonly property color baseGrayShadow: "#252525" - readonly property color baseGrayHighlight: "#575757" - readonly property color lightGray: "#6a6a6a" - readonly property color lightGrayText: "#afafaf" - readonly property color faintGray: "#e3e3e3" - readonly property color primaryHighlight: "#00b4ef" - readonly property color blueHighlight: "#00b4ef" - readonly property color blueAccent: "#0093C5" - readonly property color redHighlight: "#EA4C5F" - readonly property color redAccent: "#C62147" - readonly property color greenHighlight: "#1ac567" - readonly property color greenShadow: "#359D85" - readonly property color orangeHighlight: "#FFC49C" - readonly property color orangeAccent: "#FF6309" - readonly property color indigoHighlight: "#C0D2FF" - readonly property color indigoAccent: "#9495FF" - readonly property color magentaHighlight: "#EF93D1" - readonly property color magentaAccent: "#A2277C" - readonly property color checkboxCheckedRed: "#FF0000" - readonly property color checkboxCheckedBorderRed: "#D00000" - readonly property color lightBlueHighlight: "#d6f6ff" - - // Semitransparent - readonly property color darkGray30: "#4d121212" - readonly property color darkGray0: "#00121212" - readonly property color baseGrayShadow60: "#99252525" - readonly property color baseGrayShadow50: "#80252525" - readonly property color baseGrayShadow25: "#40252525" - readonly property color baseGrayHighlight40: "#66575757" - readonly property color baseGrayHighlight15: "#26575757" - readonly property color lightGray50: "#806a6a6a" - readonly property color lightGrayText80: "#ccafafaf" - readonly property color faintGray80: "#cce3e3e3" - readonly property color faintGray50: "#80e3e3e3" - - // Other colors - readonly property color white: "#ffffff" - readonly property color gray: "#808080" - readonly property color black: "#000000" - readonly property color locked: "#252525" - // Semitransparent - readonly property color white50: "#80ffffff" - readonly property color white30: "#4dffffff" - readonly property color white25: "#40ffffff" - readonly property color transparent: "#00ffffff" - - // Control specific colors - readonly property color tableRowLightOdd: "#fafafa" - readonly property color tableRowLightEven: "#eeeeee" // Equivavlent to "#1a575757" over #e3e3e3 background - readonly property color tableRowDarkOdd: "#2e2e2e" // Equivalent to "#80393939" over #404040 background - readonly property color tableRowDarkEven: "#1c1c1c" // Equivalent to "#a6181818" over #404040 background - readonly property color tableBackgroundLight: tableRowLightEven - readonly property color tableBackgroundDark: tableRowDarkEven - readonly property color tableScrollHandleLight: "#DDDDDD" - readonly property color tableScrollHandleDark: "#707070" - readonly property color tableScrollBackgroundLight: tableRowLightOdd - readonly property color tableScrollBackgroundDark: "#323232" - readonly property color checkboxLightStart: "#ffffff" - readonly property color checkboxLightFinish: "#afafaf" - readonly property color checkboxDarkStart: "#7d7d7d" - readonly property color checkboxDarkFinish: "#6b6a6b" - readonly property color checkboxChecked: primaryHighlight - readonly property color checkboxCheckedBorder: "#36cdff" - readonly property color sliderGutterLight: "#d4d4d4" - readonly property color sliderGutterDark: "#252525" - readonly property color sliderBorderLight: "#afafaf" - readonly property color sliderBorderDark: "#7d7d7d" - readonly property color sliderLightStart: "#ffffff" - readonly property color sliderLightFinish: "#afafaf" - readonly property color sliderDarkStart: "#7d7d7d" - readonly property color sliderDarkFinish: "#6b6a6b" - readonly property color dropDownPressedLight: "#d4d4d4" - readonly property color dropDownPressedDark: "#afafaf" - readonly property color dropDownLightStart: "#ffffff" - readonly property color dropDownLightFinish: "#afafaf" - readonly property color dropDownDarkStart: "#7d7d7d" - readonly property color dropDownDarkFinish: "#6b6a6b" - readonly property color textFieldLightBackground: "#d4d4d4" - readonly property color tabBackgroundDark: "#252525" - readonly property color tabBackgroundLight: "#d4d4d4" - } - - Item { - id: colorSchemes - readonly property int light: 0 - readonly property int dark: 1 - } - - Item { - id: dimensions - readonly property bool largeScreen: Screen.width >= 1920 && Screen.height >= 1080 - readonly property real borderRadius: largeScreen ? 7.5 : 5.0 - readonly property real borderWidth: largeScreen ? 2 : 1 - readonly property vector2d contentMargin: Qt.vector2d(21, 21) - readonly property vector2d contentSpacing: Qt.vector2d(11, 14) - readonly property real labelPadding: 40 - readonly property real textPadding: 8 - readonly property real sliderHandleSize: 18 - readonly property real sliderGrooveHeight: 8 - readonly property real frameIconSize: 22 - readonly property real spinnerSize: 50 - readonly property real tablePadding: 12 - readonly property real tableRowHeight: largeScreen ? 26 : 23 - readonly property real tableHeaderHeight: 29 - readonly property vector2d modalDialogMargin: Qt.vector2d(50, 30) - readonly property real modalDialogTitleHeight: 40 - readonly property real controlLineHeight: 28 // Height of spinbox control on 1920 x 1080 monitor - readonly property real controlInterlineHeight: 21 // 75% of controlLineHeight - readonly property vector2d menuPadding: Qt.vector2d(14, 102) - readonly property real scrollbarBackgroundWidth: 18 - readonly property real scrollbarHandleWidth: scrollbarBackgroundWidth - 2 - readonly property real tabletMenuHeader: 90 - } - - Item { - id: fontSizes // In pixels - readonly property real overlayTitle: dimensions.largeScreen ? 18 : 14 - readonly property real tabName: dimensions.largeScreen ? 12 : 10 - readonly property real sectionName: dimensions.largeScreen ? 12 : 10 - 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 tableHeading: dimensions.largeScreen ? 12 : 10 - readonly property real tableHeadingIcon: dimensions.largeScreen ? 60 : 33 - readonly property real tableText: dimensions.largeScreen ? 15 : 12 - readonly property real buttonLabel: dimensions.largeScreen ? 13 : 9 - readonly property real iconButton: dimensions.largeScreen ? 13 : 9 - readonly property real listItem: dimensions.largeScreen ? 15 : 11 - readonly property real tabularData: dimensions.largeScreen ? 15 : 11 - readonly property real logs: dimensions.largeScreen ? 16 : 12 - readonly property real code: dimensions.largeScreen ? 16 : 12 - readonly property real rootMenu: dimensions.largeScreen ? 15 : 11 - readonly property real rootMenuDisclosure: dimensions.largeScreen ? 20 : 16 - readonly property real menuItem: dimensions.largeScreen ? 15 : 11 - readonly property real shortcutText: dimensions.largeScreen ? 13 : 9 - readonly property real carat: dimensions.largeScreen ? 38 : 30 - readonly property real disclosureButton: dimensions.largeScreen ? 30 : 22 - } - - Item { - id: icons - // Values per OffscreenUi::Icon - readonly property int none: 0 - readonly property int question: 1 - readonly property int information: 2 - readonly property int warning: 3 - readonly property int critical: 4 - readonly property int placemark: 5 - } - - Item { - id: buttons - readonly property int white: 0 - readonly property int blue: 1 - readonly property int red: 2 - readonly property int black: 3 - readonly property var textColor: [ colors.darkGray, colors.white, colors.white, colors.white ] - readonly property var colorStart: [ colors.white, colors.primaryHighlight, "#d42043", "#343434" ] - readonly property var colorFinish: [ colors.lightGrayText, colors.blueAccent, "#94132e", colors.black ] - readonly property var hoveredColor: [ colorStart[white], colorStart[blue], colorStart[red], colorFinish[black] ] - readonly property var pressedColor: [ colorFinish[white], colorFinish[blue], colorFinish[red], colorStart[black] ] - readonly property var disabledColorStart: [ colorStart[white], colors.baseGrayHighlight] - readonly property var disabledColorFinish: [ colorFinish[white], colors.baseGrayShadow] - readonly property var disabledTextColor: [ colors.lightGrayText, colors.baseGrayShadow] - readonly property int radius: 5 - } - - QtObject { - id: effects - readonly property int fadeInDuration: 300 - } - Item { - id: glyphs - readonly property string noIcon: "" - readonly property string hmd: "b" - readonly property string screen: "c" - readonly property string keyboard: "d" - readonly property string handControllers: "e" - readonly property string headphonesMic: "f" - readonly property string gamepad: "g" - readonly property string headphones: "h" - readonly property string mic: "i" - readonly property string upload: "j" - readonly property string script: "k" - readonly property string text: "l" - readonly property string cube: "m" - readonly property string sphere: "n" - readonly property string zone: "o" - readonly property string light: "p" - readonly property string web: "q" - readonly property string web2: "r" - readonly property string edit: "s" - readonly property string market: "t" - readonly property string directory: "u" - readonly property string menu: "v" - readonly property string close: "w" - readonly property string closeInverted: "x" - readonly property string pin: "y" - readonly property string pinInverted: "z" - readonly property string resizeHandle: "A" - readonly property string disclosureExpand: "B" - readonly property string reloadSmall: "a" - readonly property string closeSmall: "C" - readonly property string forward: "D" - readonly property string backward: "E" - readonly property string reload: "F" - readonly property string unmuted: "G" - readonly property string muted: "H" - readonly property string minimize: "I" - readonly property string maximize: "J" - readonly property string maximizeInverted: "K" - readonly property string disclosureButtonExpand: "L" - readonly property string disclosureButtonCollapse: "M" - readonly property string scriptStop: "N" - readonly property string scriptReload: "O" - readonly property string scriptRun: "P" - readonly property string scriptNew: "Q" - readonly property string hifiForum: "2" - readonly property string hifiLogoSmall: "S" - readonly property string avatar1: "T" - readonly property string placemark: "U" - readonly property string box: "V" - readonly property string community: "0" - readonly property string grabHandle: "X" - readonly property string search: "Y" - readonly property string disclosureCollapse: "Z" - readonly property string scriptUpload: "R" - readonly property string code: "W" - readonly property string avatar: "<" - readonly property string arrowsH: ":" - readonly property string arrowsV: ";" - readonly property string arrows: "`" - readonly property string compress: "!" - readonly property string expand: "\"" - readonly property string placemark1: "#" - readonly property string circle: "$" - readonly property string handPointer: "9" - readonly property string plusSquareO: "%" - readonly property string sliders: "&" - readonly property string square: "'" - readonly property string alignCenter: "8" - readonly property string alignJustify: ")" - readonly property string alignLeft: "*" - readonly property string alignRight: "^" - readonly property string bars: "7" - readonly property string circleSlash: "," - readonly property string sync: "()" - readonly property string key: "-" - readonly property string link: "." - readonly property string location: "/" - readonly property string caratR: "3" - readonly property string caratL: "4" - readonly property string caratDn: "5" - readonly property string caratUp: "6" - readonly property string folderLg: ">" - readonly property string folderSm: "?" - readonly property string levelUp: "1" - readonly property string info: "[" - readonly property string question: "]" - readonly property string alert: "+" - readonly property string home: "_" - readonly property string error: "=" - readonly property string settings: "@" - readonly property string trash: "{" - readonly property string objectGroup: "\ue000" - readonly property string cm: "}" - readonly property string msvg79: "~" - readonly property string deg: "\\" - readonly property string px: "|" - readonly property string editPencil: "\ue00d" - readonly property string vol_0: "\ue00e" - readonly property string vol_1: "\ue00f" - readonly property string vol_2: "\ue010" - readonly property string vol_3: "\ue011" - readonly property string vol_4: "\ue012" - readonly property string vol_x_0: "\ue013" - readonly property string vol_x_1: "\ue014" - readonly property string vol_x_2: "\ue015" - readonly property string vol_x_3: "\ue016" - readonly property string vol_x_4: "\ue017" - readonly property string source: "\ue01c" - readonly property string playback_play: "\ue01d" - readonly property string stop_square: "\ue01e" - readonly property string avatarTPose: "\ue01f" - readonly property string lock: "\ue006" - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/IconButton.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/IconButton.qml deleted file mode 100644 index 84c1ef14c1..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/IconButton.qml +++ /dev/null @@ -1,20 +0,0 @@ -// -// IconButton.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayRegular { - font.pixelSize: hifi.fontSizes.iconButton - font.capitalization: Font.AllUppercase - font.letterSpacing: 1.5 -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/InfoItem.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/InfoItem.qml deleted file mode 100644 index 83781a4ef5..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/InfoItem.qml +++ /dev/null @@ -1,19 +0,0 @@ -// -// InfoItem.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewaySemiBold { - lineHeight: 2 - font.pixelSize: hifi.fontSizes.menuItem -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/InputLabel.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/InputLabel.qml deleted file mode 100644 index 59657a554d..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/InputLabel.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// InputLabel.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewaySemiBold { - font.pixelSize: hifi.fontSizes.inputLabel -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ListItem.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ListItem.qml deleted file mode 100644 index f707686edc..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ListItem.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// ListItem.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayRegular { - font.pixelSize: hifi.fontSizes.listItem -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/Logs.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/Logs.qml deleted file mode 100644 index 577fe2f8d8..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/Logs.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// Logs.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -AnonymousProRegular { - font.pixelSize: hifi.fontSizes.logs -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/OverlayTitle.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/OverlayTitle.qml deleted file mode 100644 index e23b9eca14..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/OverlayTitle.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// OverlayTitle.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayRegular { - font.pixelSize: hifi.fontSizes.overlayTitle -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayBold.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayBold.qml deleted file mode 100644 index 433fdb7ae6..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayBold.qml +++ /dev/null @@ -1,24 +0,0 @@ -// -// RalewayBold.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: ralewayBold; source: pathToFonts + "fonts/Raleway-Bold.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: ralewayBold.name - font.bold: true // Font seems to need this in order to display bold. -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayLight.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayLight.qml deleted file mode 100644 index 913918afd7..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayLight.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// RalewayLight.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: ralewayLight; source: "../../fonts/Raleway-Light.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: ralewayLight.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayRegular.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayRegular.qml deleted file mode 100644 index 2cffeeb59d..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewayRegular.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// RalewayRegular.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: ralewayRegular; source: pathToFonts + "fonts/Raleway-Regular.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: ralewayRegular.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qml deleted file mode 100644 index b6c79e02a4..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/RalewaySemiBold.qml +++ /dev/null @@ -1,23 +0,0 @@ -// -// RalewaySemiBold.qml -// -// Created by David Rowe on 12 Feb 2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -Text { - id: root - FontLoader { id: ralewaySemiBold; source: pathToFonts + "fonts/Raleway-SemiBold.ttf"; } - property real size: 32 - font.pixelSize: size - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - font.family: ralewaySemiBold.name -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/SectionName.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/SectionName.qml deleted file mode 100644 index 5438fec7bc..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/SectionName.qml +++ /dev/null @@ -1,19 +0,0 @@ -// -// SectionName.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayRegular { - font.pixelSize: hifi.fontSizes.sectionName - font.capitalization: Font.AllUppercase -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qml deleted file mode 100644 index 4134b928a7..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/Separator.qml +++ /dev/null @@ -1,41 +0,0 @@ -// -// Separator.qml -// -// Created by Zach Fox on 2017-06-06 -// Copyright 2017 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import "../styles-uit" - -Item { - // Size - height: 2; - width: parent.width; - - Rectangle { - // Size - width: parent.width; - height: 1; - // Anchors - anchors.left: parent.left; - anchors.bottom: parent.bottom; - anchors.bottomMargin: height; - // Style - color: hifi.colors.baseGrayShadow; - } - - Rectangle { - // Size - width: parent.width; - height: 1; - // Anchors - anchors.left: parent.left; - anchors.bottom: parent.bottom; - // Style - color: hifi.colors.baseGrayHighlight; - } -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml deleted file mode 100644 index a3ab351870..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/ShortcutText.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// ShortcutText.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayLight { - font.pixelSize: hifi.fontSizes.shortcutText -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml deleted file mode 100644 index eb4e790e7e..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TabName.qml +++ /dev/null @@ -1,19 +0,0 @@ -// -// TabName.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -RalewayRegular { - font.pixelSize: hifi.fontSizes.tabName - font.capitalization: Font.AllUppercase -} diff --git a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml b/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml deleted file mode 100644 index 010b4d03ad..0000000000 --- a/scripts/developer/utilities/lib/hifi-qml/styles-uit/TextFieldInput.qml +++ /dev/null @@ -1,18 +0,0 @@ -// -// TextFieldInput.qml -// -// Created by Clement on 7/18/16 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.5 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import "." - -FiraSansSemiBold { - font.pixelSize: hifi.fontSizes.textFieldInput -} diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index 7ab7342605..d2f778c3a6 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -11,8 +11,8 @@ import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Layouts 1.3 -import "../lib/hifi-qml/styles-uit" -import "../lib/hifi-qml/controls-uit" as HifiControls +import "qrc:///qml/styles-uit" +import "qrc:///qml/controls-uit" as HifiControls import "../lib/configprop" Rectangle { From 0636a2db06cca814697d8322e8b026cd2f1c43a4 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 26 Oct 2017 19:19:52 -0700 Subject: [PATCH 06/10] removing historic changes --- interface/src/ui/overlays/Billboard3DOverlay.cpp | 8 -------- interface/src/ui/overlays/Billboard3DOverlay.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/interface/src/ui/overlays/Billboard3DOverlay.cpp b/interface/src/ui/overlays/Billboard3DOverlay.cpp index f19426b054..960f0de095 100644 --- a/interface/src/ui/overlays/Billboard3DOverlay.cpp +++ b/interface/src/ui/overlays/Billboard3DOverlay.cpp @@ -37,14 +37,6 @@ QVariant Billboard3DOverlay::getProperty(const QString &property) { return Planar3DOverlay::getProperty(property); } -void Billboard3DOverlay::update(float duration) { - // Billboard's transform needs to constantly be adjusted if it faces the avatar - // if (isFacingAvatar()) { - notifyRenderTransformChange(); - // } - Base3DOverlay::update(duration); -} - bool Billboard3DOverlay::applyTransformTo(Transform& transform, bool force) { bool transformChanged = false; if (force || usecTimestampNow() > _transformExpiry) { diff --git a/interface/src/ui/overlays/Billboard3DOverlay.h b/interface/src/ui/overlays/Billboard3DOverlay.h index 6f590dd6ec..6b3aa40451 100644 --- a/interface/src/ui/overlays/Billboard3DOverlay.h +++ b/interface/src/ui/overlays/Billboard3DOverlay.h @@ -26,8 +26,6 @@ public: void setProperties(const QVariantMap& properties) override; QVariant getProperty(const QString& property) override; - void update(float deltatime) override; - protected: virtual bool applyTransformTo(Transform& transform, bool force = false) override; From 1dbeac7b882433a01bc553f53fc4315bee057bf1 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 26 Oct 2017 19:55:59 -0700 Subject: [PATCH 07/10] Adding the idons for Luci and cleaning up the scripts --- .../utilities/lib/configprop/ConfigSlider.qml | 75 ------------------- .../render/configSlider/ConfigSlider.qml | 44 ++++++----- .../utilities/render/debugDeferredLighting.js | 49 ------------ .../utilities/render/deferredLighting.qml | 4 +- scripts/developer/utilities/render/luci.js | 6 +- scripts/system/assets/images/luci-a.svg | 10 +++ scripts/system/assets/images/luci-i.svg | 13 ++++ 7 files changed, 56 insertions(+), 145 deletions(-) delete mode 100644 scripts/developer/utilities/lib/configprop/ConfigSlider.qml delete mode 100644 scripts/developer/utilities/render/debugDeferredLighting.js create mode 100644 scripts/system/assets/images/luci-a.svg create mode 100644 scripts/system/assets/images/luci-i.svg diff --git a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml b/scripts/developer/utilities/lib/configprop/ConfigSlider.qml deleted file mode 100644 index bb46536fdc..0000000000 --- a/scripts/developer/utilities/lib/configprop/ConfigSlider.qml +++ /dev/null @@ -1,75 +0,0 @@ -// -// ConfigSlider.qml -// -// Created by Zach Pomerantz on 2/8/2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html -// - -import QtQuick 2.7 -import QtQuick.Controls 1.4 as Original -import QtQuick.Controls.Styles 1.4 - -import "qrc:///qml/styles-uit" -import "qrc:///qml/controls-uit" as HifiControls - - -Item { - HifiConstants { id: luci } - id: root - - anchors.left: parent.left - anchors.right: parent.right - height: 24 - property bool integral: false - property var config - property string property - property alias label: labelControl.text - property alias min: sliderControl.minimumValue - property alias max: sliderControl.maximumValue - - Component.onCompleted: { - // Binding favors qml value, so set it first - sliderControl.value = root.config[root.property]; - bindingControl.when = true; - } - - HifiControls.Label { - id: labelControl - text: root.label - enabled: true - anchors.left: root.left - anchors.right: root.horizontalCenter - anchors.verticalCenter: root.verticalCenter - //anchors.topMargin: 7 - } - - HifiControls.Label { - id: labelValue - text: sliderControl.value.toFixed(root.integral ? 0 : 2) - anchors.right: root.right - anchors.bottom: root.bottom - anchors.bottomMargin: 0 - } - - Binding { - id: bindingControl - target: root.config - property: root.property - value: sliderControl.value - when: false - } - - HifiControls.Slider { - id: sliderControl - stepSize: root.integral ? 1.0 : 0.0 - //height: 20 - anchors.left: root.horizontalCenter - anchors.right: root.right - anchors.rightMargin: 0 - anchors.top: root.top - anchors.topMargin: 0 - } -} diff --git a/scripts/developer/utilities/render/configSlider/ConfigSlider.qml b/scripts/developer/utilities/render/configSlider/ConfigSlider.qml index 021365686a..bb46536fdc 100644 --- a/scripts/developer/utilities/render/configSlider/ConfigSlider.qml +++ b/scripts/developer/utilities/render/configSlider/ConfigSlider.qml @@ -1,6 +1,5 @@ // // ConfigSlider.qml -// examples/utilities/tools/render // // Created by Zach Pomerantz on 2/8/2016 // Copyright 2016 High Fidelity, Inc. @@ -8,12 +7,21 @@ // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html // -import QtQuick 2.5 -import QtQuick.Controls 1.4 + +import QtQuick 2.7 +import QtQuick.Controls 1.4 as Original +import QtQuick.Controls.Styles 1.4 + +import "qrc:///qml/styles-uit" +import "qrc:///qml/controls-uit" as HifiControls + Item { + HifiConstants { id: luci } id: root - width: 400 + + anchors.left: parent.left + anchors.right: parent.right height: 24 property bool integral: false property var config @@ -28,22 +36,22 @@ Item { bindingControl.when = true; } - Label { + HifiControls.Label { id: labelControl text: root.label + enabled: true anchors.left: root.left - anchors.leftMargin: 8 - anchors.top: root.top - anchors.topMargin: 7 + anchors.right: root.horizontalCenter + anchors.verticalCenter: root.verticalCenter + //anchors.topMargin: 7 } - Label { + HifiControls.Label { id: labelValue text: sliderControl.value.toFixed(root.integral ? 0 : 2) - anchors.left: root.left - anchors.leftMargin: 200 - anchors.top: root.top - anchors.topMargin: 15 + anchors.right: root.right + anchors.bottom: root.bottom + anchors.bottomMargin: 0 } Binding { @@ -54,14 +62,14 @@ Item { when: false } - Slider { + HifiControls.Slider { id: sliderControl stepSize: root.integral ? 1.0 : 0.0 - width: root.width-130 - height: 20 + //height: 20 + anchors.left: root.horizontalCenter anchors.right: root.right - anchors.rightMargin: 8 + anchors.rightMargin: 0 anchors.top: root.top - anchors.topMargin: 3 + anchors.topMargin: 0 } } diff --git a/scripts/developer/utilities/render/debugDeferredLighting.js b/scripts/developer/utilities/render/debugDeferredLighting.js deleted file mode 100644 index 2a9b1a1067..0000000000 --- a/scripts/developer/utilities/render/debugDeferredLighting.js +++ /dev/null @@ -1,49 +0,0 @@ -// -// debugDeferredLighting.js -// -// Created by Sam Gateau on 6/6/2016 -// Copyright 2016 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html -// - -// Set up the qml ui -var qml = Script.resolvePath('deferredLighting.qml'); -var window = new OverlayWindow({ - title: 'Lighting', - source: qml, - width: 400, height:400, -}); -window.setPosition(Window.innerWidth - 420, 50); -window.closed.connect(function() { Script.stop(); }); - - -var DDB = Render.RenderDeferredTask.DebugDeferredBuffer; -DDB.enabled = true; -DDB.mode = 0; - -// Debug buffer sizing -var resizing = false; -Controller.mousePressEvent.connect(function (e) { - if (shouldStartResizing(e.x)) { - resizing = true; - } -}); -Controller.mouseReleaseEvent.connect(function() { resizing = false; }); -Controller.mouseMoveEvent.connect(function (e) { resizing && setDebugBufferSize(e.x); }); -Script.scriptEnding.connect(function () { DDB.enabled = false; }); - -function shouldStartResizing(eventX) { - var x = Math.abs(eventX - Window.innerWidth * (1.0 + DDB.size.x) / 2.0); - var mode = DDB.mode; - return mode !== 0 && x < 20; -} - -function setDebugBufferSize(x) { - x = (2.0 * (x / Window.innerWidth) - 1.0); // scale - x = Math.min(Math.max(-1, x), 1); // clamp - DDB.size = { x: x, y: -1, z: 1, w: 1 }; -} - - diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index d2f778c3a6..afb1f24baf 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -13,7 +13,7 @@ import QtQuick.Layouts 1.3 import "qrc:///qml/styles-uit" import "qrc:///qml/controls-uit" as HifiControls -import "../lib/configprop" +import "configSlider" Rectangle { HifiConstants { id: hifi;} @@ -36,7 +36,7 @@ Rectangle { anchors.right: parent.right // padding: hifi.dimensions.contentMargin.x - ConfigSlider { + ConfigSlider { label: qsTr("ToneMapping") integral: false config: render.mainViewTask.getConfig("ToneMapping") diff --git a/scripts/developer/utilities/render/luci.js b/scripts/developer/utilities/render/luci.js index 3e0beb2181..1e2ac1261f 100644 --- a/scripts/developer/utilities/render/luci.js +++ b/scripts/developer/utilities/render/luci.js @@ -13,6 +13,8 @@ (function() { var TABLET_BUTTON_NAME = "LUCI"; var QMLAPP_URL = Script.resolvePath("./deferredLighting.qml"); + var ICON_URL = Script.resolvePath("../../../system/assets/images/luci-i.svg"); + var ACTIVE_ICON_URL = Script.resolvePath("../../../system/assets/images/luci-a.svg"); var onLuciScreen = false; @@ -27,7 +29,9 @@ var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var button = tablet.addButton({ - text: TABLET_BUTTON_NAME, + text: TABLET_BUTTON_NAME, + icon: ICON_URL, + activeIcon: ACTIVE_ICON_URL, sortOrder: 1 }); diff --git a/scripts/system/assets/images/luci-a.svg b/scripts/system/assets/images/luci-a.svg new file mode 100644 index 0000000000..40e1481eba --- /dev/null +++ b/scripts/system/assets/images/luci-a.svg @@ -0,0 +1,10 @@ + + + + + + + diff --git a/scripts/system/assets/images/luci-i.svg b/scripts/system/assets/images/luci-i.svg new file mode 100644 index 0000000000..2d73339908 --- /dev/null +++ b/scripts/system/assets/images/luci-i.svg @@ -0,0 +1,13 @@ + + + + + + + + From a2765cffbd565ea5489abdbd91028c126571bb4b Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Thu, 26 Oct 2017 23:22:06 -0700 Subject: [PATCH 08/10] adjusting the qml again ? i just hate the layout / anchor system --- .../utilities/render/deferredLighting.qml | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index afb1f24baf..6837b4d37f 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -21,39 +21,25 @@ Rectangle { anchors.margins: hifi.dimensions.contentMargin.x color: hifi.colors.baseGray; - property var mainViewTask: Render.getConfig("RenderMainView") + property var mainViewTask: Render.getConfig("RenderMainView") - Row { - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 10 Column { - padding: 10 spacing: 5 - - // width: parent.width anchors.left: parent.left anchors.right: parent.right - // padding: hifi.dimensions.contentMargin.x - - ConfigSlider { - label: qsTr("ToneMapping") - integral: false - config: render.mainViewTask.getConfig("ToneMapping") - property: "exposure" - max: 2 - min: 0 - - anchors.left: parent.left - anchors.right: parent.right + anchors.margins: hifi.dimensions.contentMargin.x + //padding: hifi.dimensions.contentMargin.x + HifiControls.Label { + text: "Shading" } - Row { - + anchors.left: parent.left + anchors.right: parent.right + spacing: 20 - padding: 10 Column { spacing: 10 + // padding: 10 Repeater { model: [ "Unlit:LightingModel:enableUnlit", @@ -116,6 +102,8 @@ Rectangle { } Separator {} Column { + anchors.left: parent.left + anchors.right: parent.right spacing: 10 Repeater { model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0" @@ -127,17 +115,22 @@ Rectangle { property: modelData.split(":")[2] max: modelData.split(":")[3] min: modelData.split(":")[4] + + anchors.left: parent.left + anchors.right: parent.right } } Row { + anchors.left: parent.left + anchors.right: parent.right HifiControls.Label { text: "Tone Mapping Curve" - anchors.left: root.left + // anchors.left: parent.left } HifiControls.ComboBox { - anchors.right: root.right + // anchors.right: parent.right currentIndex: 1 model: ListModel { id: cbItems @@ -151,7 +144,11 @@ Rectangle { } } } + Separator {} + Row { + anchors.left: parent.left + anchors.right: parent.right id: framebuffer spacing: 10 height: 24 @@ -159,7 +156,7 @@ Rectangle { HifiControls.Label { text: "Debug Framebuffer" height: 24 - anchors.left: root.left + // anchors.left: parent.left } property var config: render.mainViewTask.getConfig("DebugDeferredBuffer") @@ -171,7 +168,7 @@ Rectangle { HifiControls.ComboBox { height: 24 - anchors.right: root.right + // anchors.right: parent.right currentIndex: 0 model: ListModel { id: cbItemsFramebuffer @@ -273,5 +270,5 @@ Rectangle { } } } - } + //} } From 715cf301d5db1f0f548c2e8ebca22f8414cd3608 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 27 Oct 2017 12:00:10 -0700 Subject: [PATCH 09/10] cleaning the layout finally --- .../utilities/render/deferredLighting.qml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml index 6837b4d37f..86a16d9a25 100644 --- a/scripts/developer/utilities/render/deferredLighting.qml +++ b/scripts/developer/utilities/render/deferredLighting.qml @@ -121,16 +121,18 @@ Rectangle { } } - Row { + Item { + height: childrenRect.height anchors.left: parent.left anchors.right: parent.right + HifiControls.Label { text: "Tone Mapping Curve" - // anchors.left: parent.left + anchors.left: parent.left } HifiControls.ComboBox { - // anchors.right: parent.right + anchors.right: parent.right currentIndex: 1 model: ListModel { id: cbItems @@ -146,17 +148,16 @@ Rectangle { } Separator {} - Row { + Item { + height: childrenRect.height anchors.left: parent.left anchors.right: parent.right + id: framebuffer - spacing: 10 - height: 24 HifiControls.Label { text: "Debug Framebuffer" - height: 24 - // anchors.left: parent.left + anchors.left: parent.left } property var config: render.mainViewTask.getConfig("DebugDeferredBuffer") @@ -167,8 +168,7 @@ Rectangle { } HifiControls.ComboBox { - height: 24 - // anchors.right: parent.right + anchors.right: parent.right currentIndex: 0 model: ListModel { id: cbItemsFramebuffer From 7e149fe30d6682847e3be71b6e05ce1474b583a0 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 27 Oct 2017 15:18:50 -0700 Subject: [PATCH 10/10] Remove unecessary comments --- .../developer/utilities/render/configSlider/ConfigSlider.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/developer/utilities/render/configSlider/ConfigSlider.qml b/scripts/developer/utilities/render/configSlider/ConfigSlider.qml index bb46536fdc..830dc6de23 100644 --- a/scripts/developer/utilities/render/configSlider/ConfigSlider.qml +++ b/scripts/developer/utilities/render/configSlider/ConfigSlider.qml @@ -17,7 +17,7 @@ import "qrc:///qml/controls-uit" as HifiControls Item { - HifiConstants { id: luci } + HifiConstants { id: hifi } id: root anchors.left: parent.left @@ -43,7 +43,6 @@ Item { anchors.left: root.left anchors.right: root.horizontalCenter anchors.verticalCenter: root.verticalCenter - //anchors.topMargin: 7 } HifiControls.Label { @@ -65,7 +64,6 @@ Item { HifiControls.Slider { id: sliderControl stepSize: root.integral ? 1.0 : 0.0 - //height: 20 anchors.left: root.horizontalCenter anchors.right: root.right anchors.rightMargin: 0