From 72e14a32f9d4c9b468429435bfa66954a61f1bb4 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 7 Aug 2019 17:13:20 -0400 Subject: [PATCH 01/10] Implement the Help App skeleton; Implement Help App Controls; Implement Help App About --- .../qml/hifi/simplifiedUI/helpApp/HelpApp.qml | 154 ++++++++ .../simplifiedUI/helpApp/about/HelpAbout.qml | 359 ++++++++++++++++++ .../helpApp/controls/HelpControls.qml | 91 +++++ .../simplifiedUI/helpApp/images/accent1.svg | 4 + .../simplifiedUI/helpApp/images/accent2.svg | 4 + .../simplifiedUI/helpApp/images/accent3.svg | 4 + .../simplifiedUI/topBar/SimplifiedTopBar.qml | 44 ++- scripts/simplifiedUI/ui/simplifiedUI.js | 69 ++++ 8 files changed, 728 insertions(+), 1 deletion(-) create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent1.svg create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent2.svg create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent3.svg diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml new file mode 100644 index 0000000000..59d0caf30a --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml @@ -0,0 +1,154 @@ +// +// HelpApp.qml +// +// Created by Zach Fox on 2019-08-07 +// Copyright 2019 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.10 +import QtQuick.Controls 2.3 +import "../simplifiedConstants" as SimplifiedConstants +import "../simplifiedControls" as SimplifiedControls +import stylesUit 1.0 as HifiStylesUit +import "./controls" as HelpControls +import "./about" as HelpAbout + +Rectangle { + property string activeTabView: "controlsTabView" + id: root + color: simplifiedUI.colors.darkBackground + anchors.fill: parent + + SimplifiedConstants.SimplifiedConstants { + id: simplifiedUI + } + + focus: true + + Component.onCompleted: { + root.forceActiveFocus(); + } + + + Rectangle { + id: tabContainer + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + height: 64 + color: simplifiedUI.colors.highlightOnDark + + ListModel { + id: tabListModel + + ListElement { + tabTitle: "Controls" + tabViewName: "controlsTabView" + } + ListElement { + tabTitle: "About" + tabViewName: "aboutTabView" + } + } + + + Component { + id: highlightBar + Rectangle { + width: tabListView.currentItem.width + height: tabListView.currentItem.height + color: simplifiedUI.colors.darkBackground + x: tabListView.currentItem.x + Behavior on x { + SmoothedAnimation { + duration: 250 + } + } + Behavior on width { + SmoothedAnimation { + duration: 250 + } + } + } + } + + + ListView { + id: tabListView + anchors.fill: parent + contentHeight: parent.height + contentWidth: childrenRect.width + orientation: ListView.Horizontal + model: tabListModel + highlight: highlightBar + highlightFollowsCurrentItem: false + interactive: contentItem.width > width + delegate: Item { + width: tabTitleText.paintedWidth + 32 + height: parent.height + + HifiStylesUit.GraphikRegular { + id: tabTitleText + color: simplifiedUI.colors.text.white + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + text: model.tabTitle + size: 24 + } + + MouseArea { + anchors.fill: parent + onClicked: { + tabListView.currentIndex = index; + root.activeTabView = model.tabViewName; + } + } + } + } + } + + Item { + id: tabViewContainers + anchors.top: tabContainer.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + + + HelpControls.HelpControls { + id: controlsTabViewContainer + visible: activeTabView === "controlsTabView" + anchors.fill: parent + } + + HelpAbout.HelpAbout { + id: aboutTabViewContainer + visible: activeTabView === "aboutTabView" + anchors.fill: parent + } + + SimplifiedControls.VerticalScrollBar { + parent: { + if (activeTabView === "generalTabView") { + controlsTabViewContainers + } else if (activeTabView === "aboutTabView") { + aboutTabViewContainer + } + } + } + } + + + function fromScript(message) { + switch (message.method) { + default: + console.log('HelpApp.qml: Unrecognized message from JS'); + break; + } + } + signal sendToScript(var message); +} diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml new file mode 100644 index 0000000000..25f1a14a6a --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml @@ -0,0 +1,359 @@ +// +// HelpAbout.qml +// +// Created by Zach Fox on 2019-08-07 +// Copyright 2019 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.10 +import QtQuick.Controls 2.3 +import "../../simplifiedConstants" as SimplifiedConstants +import "../../simplifiedControls" as SimplifiedControls +import stylesUit 1.0 as HifiStylesUit +import QtQuick.Layouts 1.3 + +Flickable { + id: root + contentWidth: parent.width + contentHeight: aboutColumnLayout.height + clip: true + + onVisibleChanged: { + if (visible) { + root.contentX = 0; + root.contentY = 0; + + // When the user clicks the About tab, refresh the audio I/O model so that + // the delegate Component.onCompleted handlers fire, which will update + // the text that appears in the About screen. + audioOutputDevices.model = undefined; + audioOutputDevices.model = AudioScriptingInterface.devices.output; + audioInputDevices.model = undefined; + audioInputDevices.model = AudioScriptingInterface.devices.input; + } + } + + + SimplifiedConstants.SimplifiedConstants { + id: simplifiedUI + } + + + Image { + id: accent + source: "../images/accent3.svg" + anchors.left: parent.left + anchors.top: parent.top + width: 83 + height: 156 + transform: Scale { + xScale: -1 + origin.x: accent.width / 2 + origin.y: accent.height / 2 + } + } + + + ColumnLayout { + id: aboutColumnLayout + anchors.left: parent.left + anchors.leftMargin: 26 + anchors.right: parent.right + anchors.rightMargin: 26 + anchors.top: parent.top + spacing: 0 + + ColumnLayout { + id: platformInfoContainer + Layout.preferredWidth: parent.width + Layout.bottomMargin: 24 + spacing: 0 + + HifiStylesUit.GraphikSemiBold { + text: "About Your Configuration" + Layout.maximumWidth: parent.width + Layout.topMargin: 16 + Layout.bottomMargin: 8 + height: paintedHeight + size: 22 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "Use the button below to get a copy to share with us." + Layout.maximumWidth: parent.width + Layout.bottomMargin: 8 + height: paintedHeight + size: 18 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "Version " + Window.checkVersion() + Layout.maximumWidth: parent.width + Layout.topMargin: 8 + Layout.bottomMargin: 8 + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikSemiBold { + text: "Platform Info" + Layout.maximumWidth: parent.width + Layout.topMargin: 8 + Layout.bottomMargin: 8 + height: paintedHeight + size: 22 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "Computer Vendor/Model:" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + + Component.onCompleted: { + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + text = "Computer Vendor/Model: " + computerVendor + "/" + computerModel; + } + } + + HifiStylesUit.GraphikRegular { + text: "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "OS Type: " + PlatformInfo.getOperatingSystemType() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "CPU:" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + + Component.onCompleted: { + var cpu = JSON.parse(PlatformInfo.getCPU(0)); + var cpuModel = cpu.model; + if (cpuModel.length === 0) { + cpuModel = "Unknown"; + } + + text = "CPU: " + cpuModel; + } + } + + HifiStylesUit.GraphikRegular { + text: "# CPUs: " + PlatformInfo.getNumCPUs() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB" + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + HifiStylesUit.GraphikRegular { + text: "GPU: " + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + + Component.onCompleted: { + var gpu = JSON.parse(PlatformInfo.getGPU(PlatformInfo.getMasterGPU())); + var gpuModel = gpu.model; + if (gpuModel.length === 0) { + gpuModel = "Unknown"; + } + + text = "GPU: " + gpuModel; + } + } + + HifiStylesUit.GraphikRegular { + text: "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + // This is a bit of a hack to get the name of the currently-selected audio input device + // in the current mode (Desktop or VR). The reason this is necessary is because it seems to me like + // the only way one can get a human-readable list of the audio I/O devices is by using a ListView + // and grabbing the names from the AudioScriptingInterface; you can't do it using a ListModel. + // See `AudioDevices.h`, specifically the comment above the declaration of `QVariant data()`. + ListView { + id: audioInputDevices + visible: false + property string selectedInputDeviceName + Layout.preferredWidth: parent.width + Layout.preferredHeight: contentItem.height + interactive: false + delegate: Item { + Component.onCompleted: { + if (HMD.active && selectedHMD) { + audioInputDevices.selectedInputDeviceName = model.devicename + } else if (!HMD.active && selectedDesktop) { + audioInputDevices.selectedInputDeviceName = model.devicename + } + } + } + } + + HifiStylesUit.GraphikRegular { + text: "Audio Input: " + audioInputDevices.selectedInputDeviceName + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + + // This is a bit of a hack to get the name of the currently-selected audio output device + // in the current mode (Desktop or VR). The reason this is necessary is because it seems to me like + // the only way one can get a human-readable list of the audio I/O devices is by using a ListView + // and grabbing the names from the AudioScriptingInterface; you can't do it using a ListModel. + // See `AudioDevices.h`, specifically the comment above the declaration of `QVariant data()`. + ListView { + id: audioOutputDevices + visible: false + property string selectedOutputDeviceName + Layout.preferredWidth: parent.width + Layout.preferredHeight: contentItem.height + interactive: false + delegate: Item { + Component.onCompleted: { + if (HMD.active && selectedHMD) { + audioOutputDevices.selectedOutputDeviceName = model.devicename + } else if (!HMD.active && selectedDesktop) { + audioOutputDevices.selectedOutputDeviceName = model.devicename + } + } + } + } + + HifiStylesUit.GraphikRegular { + text: "Audio Output: " + audioOutputDevices.selectedOutputDeviceName + Layout.maximumWidth: parent.width + height: paintedHeight + size: 16 + color: simplifiedUI.colors.text.white + wrapMode: Text.Wrap + } + + SimplifiedControls.Button { + Layout.topMargin: 8 + width: 200 + height: 32 + text: "Copy to Clipboard" + temporaryText: "Copied!" + + onClicked: { + Window.copyToClipboard(root.buildPlatformInfoTextToCopy()); + showTemporaryText(); + } + } + } + } + + function buildPlatformInfoTextToCopy() { + var textToCopy = "**About Interface**\n"; + textToCopy += "Interface Version: " + Window.checkVersion() + "\n"; + textToCopy += "\n**Platform Info**\n"; + + var computer = JSON.parse(PlatformInfo.getComputer()); + var computerVendor = computer.vendor; + if (computerVendor.length === 0) { + computerVendor = "Unknown"; + } + var computerModel = computer.model; + if (computerModel.length === 0) { + computerModel = "Unknown"; + } + + textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n"; + textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n"; + textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n"; + + var cpu = JSON.parse(PlatformInfo.getCPU(0)); + var cpuModel = cpu.model; + if (cpuModel.length === 0) { + cpuModel = "Unknown"; + } + + textToCopy += "CPU: " + cpuModel + "\n"; + textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n"; + textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n"; + textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n"; + + var gpu = JSON.parse(PlatformInfo.getGPU(PlatformInfo.getMasterGPU())); + var gpuModel = gpu.model; + if (gpuModel.length === 0) { + gpuModel = "Unknown"; + } + + textToCopy += "GPU: " + gpuModel + "\n"; + textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) + "\n"; + textToCopy += "Audio Input: " + audioInputDevices.selectedInputDeviceName + "\n"; + textToCopy += "Audio Output: " + audioOutputDevices.selectedOutputDeviceName + "\n"; + + textToCopy += "\n**All Platform Info**\n"; + textToCopy += JSON.stringify(JSON.parse(PlatformInfo.getPlatform()), null, 4); + + return textToCopy; + } +} diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml new file mode 100644 index 0000000000..b502f7524b --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml @@ -0,0 +1,91 @@ +// +// HelpControls.qml +// +// Created by Zach Fox on 2019-08-07 +// Copyright 2019 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.10 +import QtQuick.Controls 2.3 +import "../../simplifiedConstants" as SimplifiedConstants +import "../../simplifiedControls" as SimplifiedControls +import stylesUit 1.0 as HifiStylesUit +import QtQuick.Layouts 1.3 +import PerformanceEnums 1.0 + +Flickable { + id: root + contentWidth: parent.width + contentHeight: controlsColumnLayout.height + clip: true + + onVisibleChanged: { + if (visible) { + root.contentX = 0; + root.contentY = 0; + } + } + + SimplifiedConstants.SimplifiedConstants { + id: simplifiedUI + } + + + Image { + id: accent + source: "../images/accent1.svg" + anchors.left: parent.left + anchors.top: parent.top + width: 83 + height: 156 + transform: Scale { + xScale: -1 + origin.x: accent.width / 2 + origin.y: accent.height / 2 + } + } + + + ColumnLayout { + id: controlsColumnLayout + anchors.left: parent.left + anchors.leftMargin: 26 + anchors.right: parent.right + anchors.rightMargin: 26 + anchors.top: parent.top + spacing: 0 + + HifiStylesUit.GraphikSemiBold { + text: "HQ Controls" + Layout.maximumWidth: parent.width + Layout.topMargin: 16 + height: paintedHeight + size: 22 + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "You can use the following controls to move your avatar around your HQ:" + Layout.maximumWidth: parent.width + wrapMode: Text.Wrap + height: paintedHeight + size: 18 + color: simplifiedUI.colors.text.white + } + + SimplifiedControls.Button { + Layout.topMargin: 8 + width: 200 + height: 32 + text: "VIEW ALL CONTROLS" + temporaryText: "Viewing!" + + onClicked: { + Qt.openUrlExternally("http://docs.highfidelity.com/en/rc83/explore/get-started/desktop.html"); + } + } + } +} diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent1.svg b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent1.svg new file mode 100644 index 0000000000..885edef5ac --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent2.svg b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent2.svg new file mode 100644 index 0000000000..027d9bb623 --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent3.svg b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent3.svg new file mode 100644 index 0000000000..07cc23ef1e --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/images/accent3.svg @@ -0,0 +1,4 @@ + + + + diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index acabbe9485..209966dee3 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -352,7 +352,7 @@ Rectangle { Item { id: hmdButtonContainer anchors.verticalCenter: parent.verticalCenter - anchors.right: settingsButtonContainer.left + anchors.right: helpButtonContainer.left anchors.rightMargin: 8 width: 48 height: width @@ -417,6 +417,48 @@ Rectangle { } + Item { + id: helpButtonContainer + anchors.verticalCenter: parent.verticalCenter + anchors.right: settingsButtonContainer.left + anchors.rightMargin: 3 + width: 36 + height: width + + Image { + id: helpButtonImage + source: "./images/settings.svg" + anchors.centerIn: parent + width: 22 + height: 22 + visible: false + } + + ColorOverlay { + opacity: helpButtonMouseArea.containsMouse ? 1.0 : 0.7 + anchors.fill: helpButtonImage + source: helpButtonImage + color: simplifiedUI.colors.text.white + } + + MouseArea { + id: helpButtonMouseArea + anchors.fill: parent + hoverEnabled: true + onEntered: { + Tablet.playSound(TabletEnums.ButtonHover); + } + onClicked: { + Tablet.playSound(TabletEnums.ButtonClick); + sendToScript({ + "source": "SimplifiedTopBar.qml", + "method": "toggleHelpApp" + }); + } + } + } + + Item { id: settingsButtonContainer diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js index f4f2627c66..84d5d55e0d 100644 --- a/scripts/simplifiedUI/ui/simplifiedUI.js +++ b/scripts/simplifiedUI/ui/simplifiedUI.js @@ -187,6 +187,71 @@ function toggleSettingsApp() { settingsAppWindow.closed.connect(onSettingsAppClosed); } + +var HELP_APP_MESSAGE_SOURCE = "HelpApp.qml"; +function onMessageFromHelpApp(message) { + if (message.source !== HELP_APP_MESSAGE_SOURCE) { + return; + } + + switch (message.method) { + + default: + console.log("Unrecognized message from " + HELP_APP_MESSAGE_SOURCE + ": " + JSON.stringify(message)); + break; + } +} + + +function onHelpAppClosed() { + if (helpAppWindow) { + helpAppWindow.fromQml.disconnect(onMessageFromHelpApp); + helpAppWindow.closed.disconnect(onHelpAppClosed); + } + helpAppWindow = false; +} + + +var HELP_APP_QML_PATH = Script.resourcesPath() + "qml/hifi/simplifiedUI/helpApp/HelpApp.qml"; +var HELP_APP_WINDOW_TITLE = "Help"; +var HELP_APP_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE; +var HELP_APP_WIDTH_PX = 480; +var HELP_APP_HEIGHT_PX = 615; +var HELP_APP_WINDOW_FLAGS = 0x00000001 | // Qt::Window + 0x00001000 | // Qt::WindowTitleHint + 0x00002000 | // Qt::WindowSystemMenuHint + 0x08000000 | // Qt::WindowCloseButtonHint + 0x00008000 | // Qt::WindowMaximizeButtonHint + 0x00004000; // Qt::WindowMinimizeButtonHint +var helpAppWindow = false; +function toggleHelpApp() { + if (helpAppWindow) { + helpAppWindow.close(); + // This really shouldn't be necessary. + // This signal really should automatically be called by the signal handler set up below. + // But fixing that requires an engine change, so this workaround will do. + onHelpAppClosed(); + return; + } + + helpAppWindow = Desktop.createWindow(HELP_APP_QML_PATH, { + title: HELP_APP_WINDOW_TITLE, + presentationMode: HELP_APP_PRESENTATION_MODE, + size: { + x: HELP_APP_WIDTH_PX, + y: HELP_APP_HEIGHT_PX + }, + position: { + x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - HELP_APP_WIDTH_PX / 2), + y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - HELP_APP_HEIGHT_PX / 2) + }, + overrideFlags: HELP_APP_WINDOW_FLAGS + }); + + helpAppWindow.fromQml.connect(onMessageFromHelpApp); + helpAppWindow.closed.connect(onHelpAppClosed); +} + function updateEmoteAppBarPosition() { if (!emoteAppBarWindow) { return; @@ -374,6 +439,10 @@ function onMessageFromTopBar(message) { toggleSettingsApp(); break; + case "toggleHelpApp": + toggleHelpApp(); + break; + case "setOutputMuted": setOutputMuted(message.data.outputMuted); break; From dc2e08ef6b2627378552566edef1fb0baeaedb05 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Aug 2019 13:41:03 -0400 Subject: [PATCH 02/10] Initial integration of browser --- .../qml/hifi/simplifiedUI/helpApp/HelpApp.qml | 17 ++++- .../hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml | 73 +++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml index 59d0caf30a..fb97fe812f 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml @@ -14,6 +14,7 @@ import "../simplifiedConstants" as SimplifiedConstants import "../simplifiedControls" as SimplifiedControls import stylesUit 1.0 as HifiStylesUit import "./controls" as HelpControls +import "./faq" as HelpFAQ import "./about" as HelpAbout Rectangle { @@ -48,6 +49,10 @@ Rectangle { tabTitle: "Controls" tabViewName: "controlsTabView" } + ListElement { + tabTitle: "FAQ" + tabViewName: "faqTabView" + } ListElement { tabTitle: "About" tabViewName: "aboutTabView" @@ -125,6 +130,12 @@ Rectangle { anchors.fill: parent } + HelpFAQ.HelpFAQ { + id: faqTabViewContainer + visible: activeTabView === "faqTabView" + anchors.fill: parent + } + HelpAbout.HelpAbout { id: aboutTabViewContainer visible: activeTabView === "aboutTabView" @@ -133,8 +144,10 @@ Rectangle { SimplifiedControls.VerticalScrollBar { parent: { - if (activeTabView === "generalTabView") { - controlsTabViewContainers + if (activeTabView === "controlsTabView") { + controlsTabViewContainer + } else if (activeTabView === "faqTabView") { + faqTabViewContainer } else if (activeTabView === "aboutTabView") { aboutTabViewContainer } diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml new file mode 100644 index 0000000000..3f6aa3148f --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml @@ -0,0 +1,73 @@ +// +// HelpFAQ.qml +// +// Created by Zach Fox on 2019-08-08 +// Copyright 2019 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.10 +import QtQuick.Controls 2.3 +import "../../simplifiedConstants" as SimplifiedConstants +import "../../simplifiedControls" as SimplifiedControls +import stylesUit 1.0 as HifiStylesUit +import controlsUit 1.0 as HifiControlsUit +import QtQuick.Layouts 1.3 +import PerformanceEnums 1.0 + +Item { + id: root + width: parent.width + height: parent.height + + + SimplifiedConstants.SimplifiedConstants { + id: simplifiedUI + } + + + Image { + id: accent + source: "../images/accent3.svg" + anchors.left: parent.left + anchors.top: parent.top + width: 83 + height: 156 + transform: Scale { + xScale: -1 + origin.x: accent.width / 2 + origin.y: accent.height / 2 + } + } + + + ColumnLayout { + id: faqColumnLayout + anchors.left: parent.left + anchors.leftMargin: 26 + anchors.right: parent.right + anchors.rightMargin: 26 + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + spacing: 0 + + HifiStylesUit.GraphikSemiBold { + text: "FAQ" + Layout.preferredWidth: parent.width + Layout.preferredHeight: paintedHeight + Layout.topMargin: 16 + size: 22 + color: simplifiedUI.colors.text.white + } + + HifiControlsUit.WebView { + url: "https://www.highfidelity.com/knowledge" + Layout.preferredWidth: parent.width + Layout.fillHeight: true + Layout.topMargin: 16 + } + } +} From 66199297cb6c54a876fd275f1311834339c0a3e0 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Aug 2019 12:24:37 -0700 Subject: [PATCH 03/10] button --- .../hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml index 3f6aa3148f..f2180d49be 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml @@ -13,7 +13,6 @@ import QtQuick.Controls 2.3 import "../../simplifiedConstants" as SimplifiedConstants import "../../simplifiedControls" as SimplifiedControls import stylesUit 1.0 as HifiStylesUit -import controlsUit 1.0 as HifiControlsUit import QtQuick.Layouts 1.3 import PerformanceEnums 1.0 @@ -21,7 +20,7 @@ Item { id: root width: parent.width height: parent.height - + SimplifiedConstants.SimplifiedConstants { id: simplifiedUI @@ -50,8 +49,6 @@ Item { anchors.right: parent.right anchors.rightMargin: 26 anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.bottomMargin: 16 spacing: 0 HifiStylesUit.GraphikSemiBold { @@ -63,11 +60,26 @@ Item { color: simplifiedUI.colors.text.white } - HifiControlsUit.WebView { - url: "https://www.highfidelity.com/knowledge" + HifiStylesUit.GraphikRegular { + text: "You can find our frequently asked questions here:" Layout.preferredWidth: parent.width - Layout.fillHeight: true - Layout.topMargin: 16 + Layout.preferredHeight: paintedHeight + Layout.topMargin: 8 + size: 18 + wrapMode: Text.Wrap + color: simplifiedUI.colors.text.white + } + + SimplifiedControls.Button { + Layout.topMargin: 8 + width: 200 + height: 32 + text: "VIEW FAQ" + temporaryText: "Viewing!" + + onClicked: { + Qt.openUrlExternally("https://www.highfidelity.com/knowledge"); + } } } } From 52c4d4fe69461d6a79083de4e8fdaf968eb3e04a Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 14 Aug 2019 09:31:08 -0700 Subject: [PATCH 04/10] better FAQ --- .../qml/hifi/simplifiedUI/helpApp/HelpApp.qml | 15 +++++++- .../hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml | 37 ++++++++++++++++++- .../simplifiedUI/settingsApp/SettingsApp.qml | 27 +++++++++++++- scripts/simplifiedUI/ui/simplifiedUI.js | 20 +++++++++- 4 files changed, 95 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml index fb97fe812f..d8238d35cf 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/HelpApp.qml @@ -34,6 +34,16 @@ Rectangle { } + onActiveTabViewChanged: { + for (var i = 0; i < tabListModel.count; i++) { + if (tabListModel.get(i).tabViewName === activeTabView) { + tabListView.currentIndex = i; + return; + } + } + } + + Rectangle { id: tabContainer anchors.top: parent.top @@ -108,7 +118,6 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { - tabListView.currentIndex = index; root.activeTabView = model.tabViewName; } } @@ -134,6 +143,10 @@ Rectangle { id: faqTabViewContainer visible: activeTabView === "faqTabView" anchors.fill: parent + + onSendToScript: { + root.sendToScript(message); + } } HelpAbout.HelpAbout { diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml index f2180d49be..81edc9ff37 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/faq/HelpFAQ.qml @@ -61,7 +61,7 @@ Item { } HifiStylesUit.GraphikRegular { - text: "You can find our frequently asked questions here:" + text: "You can find answers to all of our frequently asked questions by clicking the button below." Layout.preferredWidth: parent.width Layout.preferredHeight: paintedHeight Layout.topMargin: 8 @@ -81,5 +81,40 @@ Item { Qt.openUrlExternally("https://www.highfidelity.com/knowledge"); } } + + HifiStylesUit.GraphikSemiBold { + text: "Having problems with your audio?" + Layout.preferredWidth: parent.width + Layout.preferredHeight: paintedHeight + Layout.topMargin: 32 + size: 16 + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Quickly check your audio configuration and make changes to resolve any audio input/output issues." + Layout.preferredWidth: parent.width + Layout.preferredHeight: paintedHeight + Layout.topMargin: 4 + size: 18 + wrapMode: Text.Wrap + color: simplifiedUI.colors.text.white + } + + SimplifiedControls.Button { + Layout.topMargin: 8 + width: 200 + height: 32 + text: "TEST YOUR AUDIO" + + onClicked: { + root.sendToScript({ + "source": "HelpApp.qml", + "method": "goToAudioSettings" + }); + } + } } + + signal sendToScript(var message); } diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml index a9199ff5f1..ecc8bac2a7 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/SettingsApp.qml @@ -49,6 +49,15 @@ Rectangle { } } + onActiveTabViewChanged: { + for (var i = 0; i < tabListModel.count; i++) { + if (tabListModel.get(i).tabViewName === activeTabView) { + tabListView.currentIndex = i; + return; + } + } + } + Component.onCompleted: { root.forceActiveFocus(); } @@ -138,7 +147,6 @@ Rectangle { MouseArea { anchors.fill: parent onClicked: { - tabListView.currentIndex = index; root.activeTabView = model.tabViewName; } } @@ -207,7 +215,24 @@ Rectangle { function fromScript(message) { + if (message.source !== "simplifiedUI.js") { + return; + } + switch (message.method) { + case "goToSettingsTab": + var tabToGoTo = message.data.settingsTab; + switch (tabToGoTo) { + case "audio": + activeTabView = "audioTabView"; + break; + + default: + console.log("A message was sent to the Settings window to change tabs, but an invalid tab was specified."); + break; + } + break; + default: console.log('SettingsApp.qml: Unrecognized message from JS'); break; diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js index b249027b09..def3637e1c 100644 --- a/scripts/simplifiedUI/ui/simplifiedUI.js +++ b/scripts/simplifiedUI/ui/simplifiedUI.js @@ -188,6 +188,21 @@ function toggleSettingsApp() { } +function handleGoToAudioSettings() { + if (!settingsAppWindow) { + toggleSettingsApp(); + } + + settingsAppWindow.sendToQml({ + "source": "simplifiedUI.js", + "method": "goToSettingsTab", + "data": { + "settingsTab": "audio" + } + }); +} + + var HELP_APP_MESSAGE_SOURCE = "HelpApp.qml"; function onMessageFromHelpApp(message) { if (message.source !== HELP_APP_MESSAGE_SOURCE) { @@ -195,7 +210,10 @@ function onMessageFromHelpApp(message) { } switch (message.method) { - + case "goToAudioSettings": + handleGoToAudioSettings(); + break; + default: console.log("Unrecognized message from " + HELP_APP_MESSAGE_SOURCE + ": " + JSON.stringify(message)); break; From 4c006c50aa0dfd4ae419cc9a3242fc9bfd520f2f Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 16 Aug 2019 15:53:30 -0700 Subject: [PATCH 05/10] Controls almost done --- .../simplifiedUI/helpApp/about/HelpAbout.qml | 30 +- .../helpApp/controls/ControlsTable.qml | 695 ++++++++++++++++++ .../helpApp/controls/HelpControls.qml | 14 +- .../helpApp/controls/images/rightClick.svg | 15 + .../simplifiedUI/settingsApp/about/About.qml | 26 +- .../simplifiedUI/settingsApp/audio/Audio.qml | 6 +- .../hifi/simplifiedUI/settingsApp/dev/Dev.qml | 4 +- .../settingsApp/general/General.qml | 6 +- .../hifi/simplifiedUI/settingsApp/vr/VR.qml | 8 +- .../SimplifiedConstants.qml | 4 + .../simplifiedUI/topBar/SimplifiedTopBar.qml | 4 +- .../topBar/images/questionMark.svg | 11 + 12 files changed, 776 insertions(+), 47 deletions(-) create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml create mode 100644 interface/resources/qml/hifi/simplifiedUI/helpApp/controls/images/rightClick.svg create mode 100644 interface/resources/qml/hifi/simplifiedUI/topBar/images/questionMark.svg diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml index 25f1a14a6a..78ff24a2ee 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml @@ -74,7 +74,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "About Your Configuration" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.topMargin: 16 Layout.bottomMargin: 8 height: paintedHeight @@ -85,7 +85,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Use the button below to get a copy to share with us." - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.bottomMargin: 8 height: paintedHeight size: 18 @@ -95,7 +95,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Version " + Window.checkVersion() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.topMargin: 8 Layout.bottomMargin: 8 height: paintedHeight @@ -106,7 +106,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "Platform Info" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.topMargin: 8 Layout.bottomMargin: 8 height: paintedHeight @@ -117,7 +117,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Computer Vendor/Model:" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -140,7 +140,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -149,7 +149,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "OS Type: " + PlatformInfo.getOperatingSystemType() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -158,7 +158,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "CPU:" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -177,7 +177,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "# CPUs: " + PlatformInfo.getNumCPUs() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -186,7 +186,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "# CPU Cores: " + PlatformInfo.getNumLogicalCores() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -195,7 +195,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -204,7 +204,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "GPU: " - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -223,7 +223,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -255,7 +255,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Audio Input: " + audioInputDevices.selectedInputDeviceName - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -288,7 +288,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Audio Output: " + audioOutputDevices.selectedOutputDeviceName - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml new file mode 100644 index 0000000000..e66c61e98d --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml @@ -0,0 +1,695 @@ +// +// ControlsTable.qml +// +// Created by Zach Fox on 2019-08-16 +// Copyright 2019 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.10 +import QtQuick.Layouts 1.3 +import stylesUit 1.0 as HifiStylesUit + +Item { + id: controlsTableRoot + property int column1Width: 80 + property int column2Width: width - column1Width + property int rowHeight: 31 + property int rowPadding: 4 + property int mainTextSize: 18 + property int subTextSize: 14 + property color separatorColor: "#CCCCCC" + height: controlsTableColumnLayout.height + + // Top separator + Rectangle { + anchors.top: controlsTableColumnLayout.top + anchors.left: controlsTableColumnLayout.left + width: parent.width + height: 1 + color: controlsTableRoot.separatorColor + } + + // Right separator + Rectangle { + anchors.top: controlsTableColumnLayout.top + anchors.right: controlsTableColumnLayout.right + width: 1 + height: controlsTableColumnLayout.height + color: controlsTableRoot.separatorColor + } + + // Bottom separator + Rectangle { + anchors.bottom: controlsTableColumnLayout.bottom + anchors.left: controlsTableColumnLayout.left + width: parent.width + height: 1 + color: controlsTableRoot.separatorColor + } + + // Left separator + Rectangle { + anchors.top: controlsTableColumnLayout.top + anchors.left: controlsTableColumnLayout.left + width: 1 + height: controlsTableColumnLayout.height + color: controlsTableRoot.separatorColor + } + + ColumnLayout { + id: controlsTableColumnLayout + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + spacing: 0 + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + Image { + source: "images/rightClick.svg" + anchors.centerIn: parent + width: 24 + height: 24 + mipmap: true + fillMode: Image.PreserveAspectFit + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + Row { + width: controlsTableRoot.column2Width + height: controlsTableRoot.rowHeight + spacing: controlsTableRoot.rowPadding + + HifiStylesUit.GraphikRegular { + id: cameraText + text: "Camera" + width: paintedWidth + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Right-click and drag to look around" + width: parent.width - cameraText.width - parent.spacing + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + size: controlsTableRoot.subTextSize + color: Qt.rgba(255, 255, 255, 0.5) + } + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "W / ↑" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Walk Forward" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "S / ↓" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Walk Backward" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "A / ←" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Turn Left" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "A / →" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Turn Right" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "Q" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Sidestep Left" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "E" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "Sidestep Right" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "Shift" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + Row { + width: controlsTableRoot.column2Width + height: controlsTableRoot.rowHeight + spacing: controlsTableRoot.rowPadding + + HifiStylesUit.GraphikRegular { + id: runText + text: "Hold + Direction to Run" + width: paintedWidth + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Example: Shift + W" + width: parent.width - runText.width - parent.spacing + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + size: controlsTableRoot.subTextSize + color: Qt.rgba(255, 255, 255, 0.5) + } + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "Space" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + Row { + width: controlsTableRoot.column2Width + height: controlsTableRoot.rowHeight + spacing: controlsTableRoot.rowPadding + + HifiStylesUit.GraphikRegular { + id: jumpText + text: "Jump / Stand Up" + width: paintedWidth + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "Stand Up only while seated" + width: parent.width - jumpText.width - parent.spacing + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + size: controlsTableRoot.subTextSize + color: Qt.rgba(255, 255, 255, 0.5) + } + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "1" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "1st Person View" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "2" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + Row { + width: controlsTableRoot.column2Width + height: controlsTableRoot.rowHeight + spacing: controlsTableRoot.rowPadding + + HifiStylesUit.GraphikRegular { + id: mirrorText + text: "Mirror Mode" + width: paintedWidth + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + HifiStylesUit.GraphikRegular { + text: "See your own avatar" + width: parent.width - mirrorText.width - parent.spacing + height: parent.height + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + size: controlsTableRoot.subTextSize + color: Qt.rgba(255, 255, 255, 0.5) + } + } + } + + + + + + Row { + Layout.preferredWidth: parent.width + height: controlsTableRoot.rowHeight + + Item { + width: controlsTableRoot.column1Width + height: controlsTableRoot.rowHeight + + HifiStylesUit.GraphikRegular { + text: "3" + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + + Rectangle { + width: 1 + height: parent.height + color: controlsTableRoot.separatorColor + anchors.right: parent.right + anchors.top: parent.top + } + } + + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: controlsTableRoot.rowHeight + } + + HifiStylesUit.GraphikRegular { + text: "3rd Person View" + width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 + height: controlsTableRoot.rowHeight + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + size: controlsTableRoot.mainTextSize + color: simplifiedUI.colors.text.white + } + } + } +} \ No newline at end of file diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml index b502f7524b..0ad71f4b9b 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml @@ -14,7 +14,6 @@ import "../../simplifiedConstants" as SimplifiedConstants import "../../simplifiedControls" as SimplifiedControls import stylesUit 1.0 as HifiStylesUit import QtQuick.Layouts 1.3 -import PerformanceEnums 1.0 Flickable { id: root @@ -60,7 +59,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "HQ Controls" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.topMargin: 16 height: paintedHeight size: 22 @@ -69,22 +68,27 @@ Flickable { HifiStylesUit.GraphikRegular { text: "You can use the following controls to move your avatar around your HQ:" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width wrapMode: Text.Wrap height: paintedHeight size: 18 color: simplifiedUI.colors.text.white } + ControlsTable { + Layout.topMargin: 8 + Layout.preferredWidth: parent.width + } + SimplifiedControls.Button { Layout.topMargin: 8 - width: 200 + Layout.preferredWidth: 200 height: 32 text: "VIEW ALL CONTROLS" temporaryText: "Viewing!" onClicked: { - Qt.openUrlExternally("http://docs.highfidelity.com/en/rc83/explore/get-started/desktop.html"); + Qt.openUrlExternally("http://docs.highfidelity.com/explore/get-started/desktop.html"); } } } diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/images/rightClick.svg b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/images/rightClick.svg new file mode 100644 index 0000000000..6df8929a3d --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/images/rightClick.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml index 632f137339..89cccb8ecd 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/about/About.qml @@ -70,7 +70,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "Version " + Window.checkVersion() Layout.alignment: Qt.AlignHCenter - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -79,7 +79,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { text: "Platform Info" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width Layout.topMargin: 8 Layout.bottomMargin: 8 height: paintedHeight @@ -90,7 +90,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Computer Vendor/Model:" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -113,7 +113,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -122,7 +122,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "OS Type: " + PlatformInfo.getOperatingSystemType() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -131,7 +131,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "CPU:" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -150,7 +150,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "# CPUs: " + PlatformInfo.getNumCPUs() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -159,7 +159,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "# CPU Cores: " + PlatformInfo.getNumLogicalCores() - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -168,7 +168,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -177,7 +177,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "GPU: " - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -196,7 +196,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -228,7 +228,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Audio Input: " + audioInputDevices.selectedInputDeviceName - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white @@ -261,7 +261,7 @@ Flickable { HifiStylesUit.GraphikRegular { text: "Audio Output: " + audioOutputDevices.selectedOutputDeviceName - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml index bfc0bc5200..108016ef8c 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/audio/Audio.qml @@ -174,7 +174,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: micControlsTitle text: "Default Mute Controls" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -244,7 +244,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: inputDeviceTitle text: "Which input device?" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -340,7 +340,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: outputDeviceTitle text: "Which output device?" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml index fe623e5d78..4d0589c1e1 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/dev/Dev.qml @@ -68,7 +68,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: uiControlsTitle text: "User Interface" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -77,7 +77,7 @@ Flickable { HifiStylesUit.GraphikRegular { id: uiControlsSubtitle text: "You'll have to restart Interface after changing either of these settings. If you don't get any Toolbar apps back after restarting, run defaultScripts.js manually." - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 16 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml index af7e9ba4ae..a2bf26161e 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/general/General.qml @@ -72,7 +72,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: avatarNameTagsTitle text: "Avatar Name Tags" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -120,7 +120,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: performanceTitle text: "Graphics Settings" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -168,7 +168,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: cameraTitle text: "Camera View" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml b/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml index d7e85c7f68..5f0fbe49d5 100644 --- a/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml +++ b/interface/resources/qml/hifi/simplifiedUI/settingsApp/vr/VR.qml @@ -77,7 +77,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: controlsTitle text: "VR Movement Controls" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -163,7 +163,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: micControlsTitle text: "Default Mute Controls" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -206,7 +206,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: inputDeviceTitle text: "Which input device?" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white @@ -302,7 +302,7 @@ Flickable { HifiStylesUit.GraphikSemiBold { id: outputDeviceTitle text: "Which output device?" - Layout.maximumWidth: parent.width + Layout.preferredWidth: parent.width height: paintedHeight size: 22 color: simplifiedUI.colors.text.white diff --git a/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml b/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml index bc27dbad5f..88a2f46de8 100644 --- a/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml +++ b/interface/resources/qml/hifi/simplifiedUI/simplifiedConstants/SimplifiedConstants.qml @@ -153,6 +153,10 @@ QtObject { readonly property color background: "#474747" readonly property color contentItem: "#0198CB" } + readonly property QtObject table: QtObject { + readonly property color cellBackground: "#000000" + readonly property color textColor: "#ffffff" + } } readonly property color darkSeparator: "#595959" diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index 209966dee3..1e6a127f9a 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -427,9 +427,9 @@ Rectangle { Image { id: helpButtonImage - source: "./images/settings.svg" + source: "./images/questionMark.svg" anchors.centerIn: parent - width: 22 + width: 13 height: 22 visible: false } diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/images/questionMark.svg b/interface/resources/qml/hifi/simplifiedUI/topBar/images/questionMark.svg new file mode 100644 index 0000000000..eec3edb1c6 --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/images/questionMark.svg @@ -0,0 +1,11 @@ + + + + + + + From 3de9f44bf32c8e1874eda40fbdf8e239e89bb610 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 16 Aug 2019 16:00:30 -0700 Subject: [PATCH 06/10] It's working --- .../helpApp/controls/ControlsTable.qml | 190 +++++++++++++----- 1 file changed, 137 insertions(+), 53 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml index e66c61e98d..b15d7c1d72 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml @@ -21,7 +21,7 @@ Item { property int mainTextSize: 18 property int subTextSize: 14 property color separatorColor: "#CCCCCC" - height: controlsTableColumnLayout.height + Layout.preferredHeight: controlsTableColumnLayout.height // Top separator Rectangle { @@ -43,7 +43,8 @@ Item { // Bottom separator Rectangle { - anchors.bottom: controlsTableColumnLayout.bottom + anchors.top: controlsTableColumnLayout.top + anchors.topMargin: controlsTableRoot.height anchors.left: controlsTableColumnLayout.left width: parent.width height: 1 @@ -68,11 +69,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height Image { source: "images/rightClick.svg" @@ -92,9 +93,15 @@ Item { } } + // Spacer + Item { + width: controlsTableRoot.rowPadding + height: parent.height + } + Row { width: controlsTableRoot.column2Width - height: controlsTableRoot.rowHeight + height: parent.height spacing: controlsTableRoot.rowPadding HifiStylesUit.GraphikRegular { @@ -110,7 +117,7 @@ Item { HifiStylesUit.GraphikRegular { text: "Right-click and drag to look around" - width: parent.width - cameraText.width - parent.spacing + width: parent.width - cameraText.width - parent.spacing - controlsTableRoot.rowPadding height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter @@ -120,6 +127,13 @@ Item { } } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -127,11 +141,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "W / ↑" @@ -154,19 +168,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Walk Forward" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -174,11 +195,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "S / ↓" @@ -201,19 +222,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Walk Backward" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -221,11 +249,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "A / ←" @@ -248,19 +276,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Turn Left" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -268,11 +303,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "A / →" @@ -295,19 +330,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Turn Right" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -315,11 +357,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "Q" @@ -342,19 +384,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Sidestep Left" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -362,11 +411,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "E" @@ -389,19 +438,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "Sidestep Right" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -409,11 +465,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "Shift" @@ -436,12 +492,12 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } Row { width: controlsTableRoot.column2Width - height: controlsTableRoot.rowHeight + height: parent.height spacing: controlsTableRoot.rowPadding HifiStylesUit.GraphikRegular { @@ -457,7 +513,7 @@ Item { HifiStylesUit.GraphikRegular { text: "Example: Shift + W" - width: parent.width - runText.width - parent.spacing + width: parent.width - runText.width - parent.spacing - controlsTableRoot.rowPadding height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter @@ -467,6 +523,13 @@ Item { } } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -474,11 +537,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "Space" @@ -501,12 +564,12 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } Row { width: controlsTableRoot.column2Width - height: controlsTableRoot.rowHeight + height: parent.height spacing: controlsTableRoot.rowPadding HifiStylesUit.GraphikRegular { @@ -522,7 +585,7 @@ Item { HifiStylesUit.GraphikRegular { text: "Stand Up only while seated" - width: parent.width - jumpText.width - parent.spacing + width: parent.width - jumpText.width - parent.spacing - controlsTableRoot.rowPadding height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter @@ -532,6 +595,13 @@ Item { } } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -539,11 +609,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "1" @@ -566,19 +636,26 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "1st Person View" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize color: simplifiedUI.colors.text.white } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -586,11 +663,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "2" @@ -613,12 +690,12 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } Row { width: controlsTableRoot.column2Width - height: controlsTableRoot.rowHeight + height: parent.height spacing: controlsTableRoot.rowPadding HifiStylesUit.GraphikRegular { @@ -634,7 +711,7 @@ Item { HifiStylesUit.GraphikRegular { text: "See your own avatar" - width: parent.width - mirrorText.width - parent.spacing + width: parent.width - mirrorText.width - parent.spacing - controlsTableRoot.rowPadding height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter @@ -644,6 +721,13 @@ Item { } } } + + // Bottom separator + Rectangle { + Layout.preferredWidth: parent.width + Layout.preferredHeight: 1 + color: controlsTableRoot.separatorColor + } @@ -651,11 +735,11 @@ Item { Row { Layout.preferredWidth: parent.width - height: controlsTableRoot.rowHeight + Layout.preferredHeight: controlsTableRoot.rowHeight Item { width: controlsTableRoot.column1Width - height: controlsTableRoot.rowHeight + height: parent.height HifiStylesUit.GraphikRegular { text: "3" @@ -678,13 +762,13 @@ Item { // Spacer Item { width: controlsTableRoot.rowPadding - height: controlsTableRoot.rowHeight + height: parent.height } HifiStylesUit.GraphikRegular { text: "3rd Person View" width: controlsTableRoot.column2Width - controlsTableRoot.rowPadding * 2 - height: controlsTableRoot.rowHeight + height: parent.height horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter size: controlsTableRoot.mainTextSize From 2b86947d4abab020e3bd2857d4e3d2a187093407 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 19 Aug 2019 10:32:08 -0700 Subject: [PATCH 07/10] Mipmap images; better padding --- .../helpApp/controls/ControlsTable.qml | 2 +- .../helpApp/controls/HelpControls.qml | 2 +- .../inputDeviceButton/InputDeviceButton.qml | 1 + .../hifi/simplifiedUI/topBar/SimplifiedTopBar.qml | 15 ++++++++++----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml index b15d7c1d72..f131dc88d7 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml @@ -17,7 +17,7 @@ Item { property int column1Width: 80 property int column2Width: width - column1Width property int rowHeight: 31 - property int rowPadding: 4 + property int rowPadding: 8 property int mainTextSize: 18 property int subTextSize: 14 property color separatorColor: "#CCCCCC" diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml index 0ad71f4b9b..01c5187aa5 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/HelpControls.qml @@ -81,7 +81,7 @@ Flickable { } SimplifiedControls.Button { - Layout.topMargin: 8 + Layout.topMargin: 14 Layout.preferredWidth: 200 height: 32 text: "VIEW ALL CONTROLS" diff --git a/interface/resources/qml/hifi/simplifiedUI/inputDeviceButton/InputDeviceButton.qml b/interface/resources/qml/hifi/simplifiedUI/inputDeviceButton/InputDeviceButton.qml index 15f4c42d39..c7f938b986 100644 --- a/interface/resources/qml/hifi/simplifiedUI/inputDeviceButton/InputDeviceButton.qml +++ b/interface/resources/qml/hifi/simplifiedUI/inputDeviceButton/InputDeviceButton.qml @@ -176,6 +176,7 @@ Rectangle { anchors.left: parent.left width: parent.width height: parent.parent.height + mipmap: true } ColorOverlay { diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index 1e6a127f9a..d87431ea9c 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -245,6 +245,7 @@ Rectangle { width: outputDeviceButton.outputMuted ? 25 : 26 height: 22 visible: false + mipmap: true } ColorOverlay { @@ -319,6 +320,7 @@ Rectangle { anchors.centerIn: parent width: statusButton.currentStatus === "busy" ? 13 : 14 height: statusButton.currentStatus === "busy" ? 2 : 10 + mipmap: true } ColorOverlay { @@ -353,18 +355,19 @@ Rectangle { id: hmdButtonContainer anchors.verticalCenter: parent.verticalCenter anchors.right: helpButtonContainer.left - anchors.rightMargin: 8 + anchors.rightMargin: 3 width: 48 height: width visible: false Image { id: displayModeImage - source: HMD.active ? "./images/desktopMode.svg" : "./images/vrMode.svg" + source: HMD.active ? "images/desktopMode.svg" : "images/vrMode.svg" anchors.centerIn: parent width: HMD.active ? 25 : 26 height: HMD.active ? 22 : 14 visible: false + mipmap: true } ColorOverlay { @@ -421,17 +424,18 @@ Rectangle { id: helpButtonContainer anchors.verticalCenter: parent.verticalCenter anchors.right: settingsButtonContainer.left - anchors.rightMargin: 3 + anchors.rightMargin: 4 width: 36 height: width Image { id: helpButtonImage - source: "./images/questionMark.svg" + source: "images/questionMark.svg" anchors.centerIn: parent width: 13 height: 22 visible: false + mipmap: true } ColorOverlay { @@ -470,11 +474,12 @@ Rectangle { Image { id: settingsButtonImage - source: "./images/settings.svg" + source: "images/settings.svg" anchors.centerIn: parent width: 22 height: 22 visible: false + mipmap: true } ColorOverlay { From 42705c2fea43eb6fce787773d7d2b593200dd586 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 19 Aug 2019 11:04:54 -0700 Subject: [PATCH 08/10] Combine conditional statements --- .../qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml index 78ff24a2ee..4a36232029 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml @@ -244,9 +244,7 @@ Flickable { interactive: false delegate: Item { Component.onCompleted: { - if (HMD.active && selectedHMD) { - audioInputDevices.selectedInputDeviceName = model.devicename - } else if (!HMD.active && selectedDesktop) { + if ((HMD.active && selectedHMD) || (!HMD.active && selectedDesktop)) { audioInputDevices.selectedInputDeviceName = model.devicename } } @@ -277,9 +275,7 @@ Flickable { interactive: false delegate: Item { Component.onCompleted: { - if (HMD.active && selectedHMD) { - audioOutputDevices.selectedOutputDeviceName = model.devicename - } else if (!HMD.active && selectedDesktop) { + if ((HMD.active && selectedHMD) || (!HMD.active && selectedDesktop)) { audioOutputDevices.selectedOutputDeviceName = model.devicename } } From ca2cdfc53397b00555a6b9b5cc6a288d063c2e8a Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 19 Aug 2019 11:13:11 -0700 Subject: [PATCH 09/10] Fix some engine bugs that fix muted state in all UIs including simplifiedUI --- interface/src/scripting/Audio.cpp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/interface/src/scripting/Audio.cpp b/interface/src/scripting/Audio.cpp index f5569a19b2..e3e6138744 100644 --- a/interface/src/scripting/Audio.cpp +++ b/interface/src/scripting/Audio.cpp @@ -90,16 +90,21 @@ void Audio::setMuted(bool isMuted) { void Audio::setMutedDesktop(bool isMuted) { bool changed = false; + bool isHMD = qApp->isHMDMode(); withWriteLock([&] { if (_mutedDesktop != isMuted) { changed = true; _mutedDesktop = isMuted; - auto client = DependencyManager::get().data(); - QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted), Q_ARG(bool, false)); + if (!isHMD) { + auto client = DependencyManager::get().data(); + QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted), Q_ARG(bool, false)); + } } }); if (changed) { - emit mutedChanged(isMuted); + if (!isHMD) { + emit mutedChanged(isMuted); + } emit mutedDesktopChanged(isMuted); } } @@ -112,16 +117,21 @@ bool Audio::getMutedDesktop() const { void Audio::setMutedHMD(bool isMuted) { bool changed = false; + bool isHMD = qApp->isHMDMode(); withWriteLock([&] { if (_mutedHMD != isMuted) { changed = true; _mutedHMD = isMuted; - auto client = DependencyManager::get().data(); - QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted), Q_ARG(bool, false)); + if (isHMD) { + auto client = DependencyManager::get().data(); + QMetaObject::invokeMethod(client, "setMuted", Q_ARG(bool, isMuted), Q_ARG(bool, false)); + } } }); if (changed) { - emit mutedChanged(isMuted); + if (isHMD) { + emit mutedChanged(isMuted); + } emit mutedHMDChanged(isMuted); } } @@ -386,6 +396,7 @@ void Audio::onContextChanged() { changed = true; } }); + if (_settingsLoaded) { bool isMuted = isHMD ? getMutedHMD() : getMutedDesktop(); setMuted(isMuted); @@ -395,6 +406,12 @@ void Audio::onContextChanged() { } if (changed) { emit contextChanged(isHMD ? Audio::HMD : Audio::DESKTOP); + + bool mutedHMD = getMutedHMD(); + bool mutedDesktop = getMutedDesktop(); + if (mutedHMD != mutedDesktop) { + emit mutedChanged(isHMD ? mutedHMD : mutedDesktop); + } } } From 35a2cb7f27340f4ca09fe4b9474956caec970d6e Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 19 Aug 2019 13:08:42 -0700 Subject: [PATCH 10/10] BUGZ-1295: Fix typo in Help > Controls > Turn Right --- .../qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml index f131dc88d7..b647d5ca24 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/controls/ControlsTable.qml @@ -310,7 +310,7 @@ Item { height: parent.height HifiStylesUit.GraphikRegular { - text: "A / →" + text: "D / →" anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter