From d904bcd1cd8011ecc56cc1241e1cfa7df9ac47a3 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 15 May 2018 14:39:07 -0700 Subject: [PATCH] UX improvements --- .../spectator-camera/SpectatorCamera.qml | 76 +++++-------------- .../spectator-camera/spectatorCamera.js | 34 +++++---- 2 files changed, 37 insertions(+), 73 deletions(-) diff --git a/unpublishedScripts/marketplace/spectator-camera/SpectatorCamera.qml b/unpublishedScripts/marketplace/spectator-camera/SpectatorCamera.qml index 6b77761ca4..1b3698acd8 100644 --- a/unpublishedScripts/marketplace/spectator-camera/SpectatorCamera.qml +++ b/unpublishedScripts/marketplace/spectator-camera/SpectatorCamera.qml @@ -172,7 +172,7 @@ Rectangle { anchors.top: titleBarContainer.bottom; anchors.left: parent.left; anchors.right: parent.right; - anchors.bottom: footer.top; + anchors.bottom: parent.bottom; // Instructions or Preview Rectangle { @@ -316,7 +316,7 @@ Rectangle { id: takeSnapshotButton; enabled: masterSwitch.checked; text: "SNAP PICTURE"; - colorScheme: hifi.colorSchemes.dark; + colorScheme: hifi.colorSchemes.light; color: hifi.buttons.white; anchors.bottom: parent.bottom; anchors.bottomMargin: 8; @@ -332,7 +332,7 @@ Rectangle { id: take360SnapshotButton; enabled: masterSwitch.checked; text: "SNAP 360"; - colorScheme: hifi.colorSchemes.dark; + colorScheme: hifi.colorSchemes.light; color: hifi.buttons.white; anchors.bottom: parent.bottom; anchors.bottomMargin: 8; @@ -469,6 +469,20 @@ Rectangle { } } + HifiControlsUit.Button { + text: "Change Snapshot Location"; + colorScheme: hifi.colorSchemes.dark; + color: hifi.buttons.none; + anchors.bottom: spectatorDescriptionContainer.top; + anchors.bottomMargin: 16; + anchors.left: parent.left; + anchors.right: parent.right; + height: 35; + onClicked: { + sendToScript({method: 'openSettings'}); + } + } + Item { id: spectatorDescriptionContainer; // Size @@ -477,7 +491,7 @@ Rectangle { anchors.left: parent.left; anchors.right: parent.right; anchors.bottom: parent.bottom; - anchors.bottomMargin: 12; + anchors.bottomMargin: 20; // "Spectator" app description text HifiStylesUit.RalewayRegular { @@ -546,60 +560,6 @@ Rectangle { } } } - - Item { - id: footer; - anchors.bottom: parent.bottom; - anchors.left: parent.left; - anchors.right: parent.right; - height: 35; - - // Separator - HifiControlsUit.Separator { - anchors.left: parent.left; - anchors.right: parent.right; - anchors.top: parent.top; - } - - Item { - id: settingsButtonContainer; - anchors.top: parent.top; - anchors.left: parent.left; - anchors.bottom: parent.bottom; - width: childrenRect.width; - - HifiStylesUit.HiFiGlyphs { - id: snapshotLocationGlyph; - text: hifi.glyphs.settings; - size: 30; - color: hifi.colors.lightGrayText; - anchors.top: parent.top; - anchors.bottom: parent.bottom; - anchors.left: parent.left; - anchors.leftMargin: -1; - verticalAlignment: Text.AlignVCenter; - } - HifiStylesUit.RalewayLight { - id: snapshotLocationHeaderText; - text: "Change Snapshot Location"; - anchors.top: parent.top; - anchors.bottom: parent.bottom; - anchors.left: snapshotLocationGlyph.right; - anchors.leftMargin: -3; - size: 18; - width: paintedWidth; - color: hifi.colors.lightGrayText; - verticalAlignment: Text.AlignVCenter; - } - - MouseArea { - anchors.fill: parent; - onClicked: { - sendToScript({method: 'openSettings'}); - } - } - } - } // // SPECTATOR CONTROLS END // diff --git a/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js b/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js index 0fa738fd67..e95c05aef9 100644 --- a/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js +++ b/unpublishedScripts/marketplace/spectator-camera/spectatorCamera.js @@ -506,6 +506,23 @@ } } + function updateSpectatorCameraQML() { + sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera }); + sendToQml({ method: 'updateMonitorShowsSwitch', params: monitorShowsCameraView }); + if (!switchViewControllerMapping || !takeSnapshotControllerMapping) { + registerButtonMappings(); + } else { + sendToQml({ + method: 'updateControllerMappingCheckbox', + switchViewSetting: switchViewFromController, + takeSnapshotSetting: takeSnapshotFromController, + controller: controllerType + }); + } + Menu.setIsOptionChecked("Disable Preview", false); + Menu.setIsOptionChecked("Mono Preview", true); + } + // Function Name: onTabletScreenChanged() // // Description: @@ -520,20 +537,7 @@ } if (onSpectatorCameraScreen) { - sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera }); - sendToQml({ method: 'updateMonitorShowsSwitch', params: monitorShowsCameraView }); - if (!switchViewControllerMapping) { - registerButtonMappings(); - } else { - sendToQml({ - method: 'updateControllerMappingCheckbox', - switchViewSetting: switchViewFromController, - takeSnapshotSetting: takeSnapshotFromController, - controller: controllerType - }); - } - Menu.setIsOptionChecked("Disable Preview", false); - Menu.setIsOptionChecked("Mono Preview", true); + updateSpectatorCameraQML(); } } @@ -582,7 +586,7 @@ || (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar", true))) { Desktop.show("hifi/dialogs/GeneralPreferencesDialog.qml", "GeneralPreferencesDialog"); } else { - tablet.loadQMLOnTop("hifi/tablet/TabletGeneralPreferences.qml"); + tablet.pushOntoStack("hifi/tablet/TabletGeneralPreferences.qml"); } break; default: