diff --git a/interface/resources/qml/hifi/tablet/Tablet.qml b/interface/resources/qml/hifi/tablet/Tablet.qml index 08e0599a50..128b3a1fd6 100644 --- a/interface/resources/qml/hifi/tablet/Tablet.qml +++ b/interface/resources/qml/hifi/tablet/Tablet.qml @@ -9,8 +9,6 @@ Item { property int rowIndex: 0 property int columnIndex: 0 property int count: (flowMain.children.length - 1) - width: parent.width - height: parent.height // called by C++ code to keep audio bar updated function setMicLevel(newMicLevel) { diff --git a/interface/resources/qml/hifi/tablet/TabletMenu.qml b/interface/resources/qml/hifi/tablet/TabletMenu.qml index a80ca12d5f..a9ca1b884c 100644 --- a/interface/resources/qml/hifi/tablet/TabletMenu.qml +++ b/interface/resources/qml/hifi/tablet/TabletMenu.qml @@ -62,14 +62,14 @@ FocusScope { id: iconColorOverlay anchors.fill: menuRootIcon source: menuRootIcon - color: "#ffffff" + color: "#34a2c7" } RalewayBold { id: breadcrumbText text: "Menu" - size: 18 - color: "#ffffff" + size: 26 + color: "#34a2c7" anchors.verticalCenter: parent.verticalCenter anchors.left: menuRootIcon.right anchors.leftMargin: 15 @@ -77,7 +77,7 @@ FocusScope { anchors.fill: parent hoverEnabled: true onEntered: breadcrumbText.color = "#1fc6a6"; - onExited: breadcrumbText.color = "#ffffff"; + onExited: breadcrumbText.color = "#34a2c7"; // navigate back to parent level menu if there is one onClicked: if (breadcrumbText.text !== "Menu") { diff --git a/interface/resources/qml/hifi/tablet/TabletMenuItem.qml b/interface/resources/qml/hifi/tablet/TabletMenuItem.qml index ae6a56e9df..c9223650f8 100644 --- a/interface/resources/qml/hifi/tablet/TabletMenuItem.qml +++ b/interface/resources/qml/hifi/tablet/TabletMenuItem.qml @@ -50,7 +50,7 @@ Item { RalewaySemiBold { id: label - size: hifi.fontSizes.rootMenu + size: 20 font.capitalization: isSubMenu ? Font.MixedCase : Font.AllUppercase anchors.left: check.right anchors.verticalCenter: parent.verticalCenter @@ -103,7 +103,7 @@ Item { HiFiGlyphs { text: hifi.glyphs.disclosureExpand color: source.enabled ? hifi.colors.baseGrayShadow : hifi.colors.baseGrayShadow25 - size: 2 * hifi.fontSizes.rootMenuDisclosure + size: 70 anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right horizontalAlignment: Text.AlignRight diff --git a/libraries/script-engine/src/TabletScriptingInterface.cpp b/libraries/script-engine/src/TabletScriptingInterface.cpp index 944da0aa8d..1a028dd0a0 100644 --- a/libraries/script-engine/src/TabletScriptingInterface.cpp +++ b/libraries/script-engine/src/TabletScriptingInterface.cpp @@ -204,7 +204,7 @@ void TabletProxy::gotoMenuScreen() { if (_qmlTabletRoot) { if (_state != State::Menu) { auto loader = _qmlTabletRoot->findChild("loader"); - QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToMenuScreen())); + QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToMenuScreen()), Qt::DirectConnection); QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(VRMENU_SOURCE_URL))); _state = State::Menu; } @@ -215,7 +215,7 @@ void TabletProxy::gotoHomeScreen() { if (_qmlTabletRoot) { if (_state != State::Home) { auto loader = _qmlTabletRoot->findChild("loader"); - QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen())); + QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()), Qt::DirectConnection); QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(TABLET_SOURCE_URL))); QMetaObject::invokeMethod(_qmlTabletRoot, "playButtonClickSound"); _state = State::Home; diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 4c542e9867..ee16b683b3 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -196,6 +196,7 @@ var toolBar = (function () { function cleanup() { that.setActive(false); + tablet.removeButton(activeButton); } function addButton(name, image, handler) { @@ -696,7 +697,9 @@ function mouseClickEvent(event) { toolBar.setActive(true); var pickRay = result.pickRay; var foundEntity = result.entityID; - + if (foundEntity === HMD.tabletID) { + return; + } properties = Entities.getEntityProperties(foundEntity); if (isLocked(properties)) { if (wantDebug) { diff --git a/scripts/system/menu.js b/scripts/system/menu.js index 0481bc8296..1b67a7995c 100644 --- a/scripts/system/menu.js +++ b/scripts/system/menu.js @@ -14,7 +14,7 @@ var HOME_BUTTON_TEXTURE = "http://hifi-content.s3.amazonaws.com/alan/dev/tablet- var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var button = tablet.addButton({ icon: "icons/tablet-icons/menu-i.svg", - text: "Menu" + text: "MENU" }); diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 7011aa4cab..017f9c0958 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -104,4 +104,10 @@ } return micLevel; } + + Script.scriptEnding.connect(function () { + Entities.deleteEntity(HMD.tabletID); + HMD.tabletID = null; + HDM.homeButtonID = null; + }); }()); // END LOCAL_SCOPE