diff --git a/interface/resources/qml/hifi/AvatarApp.qml b/interface/resources/qml/hifi/AvatarApp.qml index 57e4db062a..559f5bfba7 100644 --- a/interface/resources/qml/hifi/AvatarApp.qml +++ b/interface/resources/qml/hifi/AvatarApp.qml @@ -10,7 +10,7 @@ import "avatarapp" Rectangle { id: root width: 480 - height: 706 + height: 706 property bool keyboardEnabled: true property bool keyboardRaised: false @@ -415,7 +415,7 @@ Rectangle { width: 21.2 height: 19.3 source: isAvatarInFavorites ? '../../images/FavoriteIconActive.svg' : '../../images/FavoriteIconInActive.svg' - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } // TextStyle5 @@ -424,7 +424,7 @@ Rectangle { Layout.fillWidth: true text: isAvatarInFavorites ? avatarName : "Add to Favorites" elide: Qt.ElideRight - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } } diff --git a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml index 256d951a45..e8b776f47b 100644 --- a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml +++ b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml @@ -153,7 +153,7 @@ Rectangle { visible = false; adjustWearablesClosed(status, avatarName); } - + HifiConstants { id: hifi } @@ -226,7 +226,7 @@ Rectangle { lineHeightMode: Text.FixedHeight lineHeight: 18; text: "Wearable" - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } spacing: 10 @@ -237,7 +237,7 @@ Rectangle { lineHeight: 18; text: "Get more" linkColor: hifi.colors.blueHighlight - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter onLinkActivated: { popup.showGetWearables(function() { emitSendToScript({'method' : 'navigate', 'url' : 'hifi://AvatarIsland/11.5848,-8.10862,-2.80195'}) diff --git a/interface/resources/qml/hifi/avatarapp/Settings.qml b/interface/resources/qml/hifi/avatarapp/Settings.qml index cd892c17b1..0284d2d67c 100644 --- a/interface/resources/qml/hifi/avatarapp/Settings.qml +++ b/interface/resources/qml/hifi/avatarapp/Settings.qml @@ -103,11 +103,11 @@ Rectangle { size: 17; text: "Avatar Scale" verticalAlignment: Text.AlignVCenter - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } RowLayout { - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter Layout.fillWidth: true spacing: 0 @@ -117,7 +117,7 @@ Rectangle { text: 'T' verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } HifiControlsUit.Slider { @@ -135,7 +135,7 @@ Rectangle { } } - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter Layout.fillWidth: true // TextStyle9 @@ -164,7 +164,7 @@ Rectangle { text: 'T' verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter + Layout.alignment: Qt.AlignVCenter } } @@ -327,8 +327,7 @@ Rectangle { InputTextStyle4 { id: avatarAnimationUrlInputText font.pixelSize: 17 - anchors.left: parent.left - anchors.right: parent.right + Layout.fillWidth: true placeholderText: 'user\\file\\dir' onFocusChanged: { @@ -357,8 +356,7 @@ Rectangle { InputTextStyle4 { id: avatarCollisionSoundUrlInputText font.pixelSize: 17 - anchors.left: parent.left - anchors.right: parent.right + Layout.fillWidth: true placeholderText: 'https://hifi-public.s3.amazonaws.com/sounds/Collisions-' onFocusChanged: { diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fbad66bf55..1dd561ad35 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1779,7 +1779,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo updateHeartbeat(); QTimer* settingsTimer = new QTimer(); moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{ - // This needs to run on the settings thread, so we need to pass the `settingsTimer` as the + // This needs to run on the settings thread, so we need to pass the `settingsTimer` as the // receiver object, otherwise it will run on the application thread and trigger a warning // about trying to kill the timer on the main thread. connect(qApp, &Application::beforeAboutToQuit, settingsTimer, [this, settingsTimer]{ @@ -2662,7 +2662,7 @@ Application::~Application() { // shutdown graphics engine _graphicsEngine.shutdown(); - + _gameWorkload.shutdown(); DependencyManager::destroy(); @@ -2838,6 +2838,8 @@ void Application::initializeDisplayPlugins() { auto hmdDisplayPlugin = dynamic_cast(displayPlugin.get()); QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdMountedChanged, DependencyManager::get().data(), &HMDScriptingInterface::mountedChanged); + QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdMountedChanged, + DependencyManager::get().data(), &HMDScriptingInterface::activeChanged); QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdVisibleChanged, this, &Application::hmdVisibleChanged); } } @@ -8572,7 +8574,7 @@ QUuid Application::getTabletFrameID() const { } QVector Application::getTabletIDs() const { - // Most important overlays first. + // Most important overlays first. QVector result; auto HMD = DependencyManager::get(); result << HMD->getCurrentTabletScreenID(); diff --git a/libraries/display-plugins/src/display-plugins/AbstractHMDScriptingInterface.h b/libraries/display-plugins/src/display-plugins/AbstractHMDScriptingInterface.h index 4234a8731b..0c35a5456c 100644 --- a/libraries/display-plugins/src/display-plugins/AbstractHMDScriptingInterface.h +++ b/libraries/display-plugins/src/display-plugins/AbstractHMDScriptingInterface.h @@ -15,7 +15,7 @@ // These properties have JSDoc documentation in HMDScriptingInterface.h. class AbstractHMDScriptingInterface : public QObject { Q_OBJECT - Q_PROPERTY(bool active READ isHMDMode) + Q_PROPERTY(bool active READ isHMDMode NOTIFY activeChanged) Q_PROPERTY(float ipd READ getIPD) Q_PROPERTY(float eyeHeight READ getEyeHeight) Q_PROPERTY(float playerHeight READ getPlayerHeight) @@ -43,7 +43,7 @@ signals: /**jsdoc * Triggered when Interface's display mode changes and when the user puts on or takes off their HMD. * @function HMD.displayModeChanged - * @param {boolean} isHMDMode - true if the display mode is HMD, otherwise false. This is the + * @param {boolean} isHMDMode - true if the display mode is HMD, otherwise false. This is the * same value as provided by HMD.active. * @returns {Signal} * @example Report when the display mode changes. @@ -67,6 +67,8 @@ signals: */ void mountedChanged(); + void activeChanged(); + private: float _IPDScale{ 1.0 }; };