From e2a8ee2a4cf690100e6df38550c403e189e773b8 Mon Sep 17 00:00:00 2001 From: vladest Date: Tue, 15 May 2018 20:02:29 +0200 Subject: [PATCH] Fixed About date format. Increased space between logo and build info --- .../resources/qml/hifi/dialogs/TabletAboutDialog.qml | 1 + interface/src/AboutUtil.cpp | 10 ++++++++-- interface/src/AboutUtil.h | 2 ++ interface/src/ui/PreferencesDialog.cpp | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/dialogs/TabletAboutDialog.qml b/interface/resources/qml/hifi/dialogs/TabletAboutDialog.qml index 2cb079a070..579aa1cb1e 100644 --- a/interface/resources/qml/hifi/dialogs/TabletAboutDialog.qml +++ b/interface/resources/qml/hifi/dialogs/TabletAboutDialog.qml @@ -27,6 +27,7 @@ Rectangle { sourceSize.height: 75 source: "../../../images/about-highfidelity.png" } + Item { height: 30; width: 1 } Column { id: buildColumm anchors.left: parent.left diff --git a/interface/src/AboutUtil.cpp b/interface/src/AboutUtil.cpp index e70ad9bbbf..5179897443 100644 --- a/interface/src/AboutUtil.cpp +++ b/interface/src/AboutUtil.cpp @@ -8,6 +8,8 @@ // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include +#include #include "AboutUtil.h" #include "BuildInfo.h" @@ -17,7 +19,11 @@ #include "Application.h" #include -AboutUtil::AboutUtil(QObject *parent) : QObject(parent) {} +AboutUtil::AboutUtil(QObject *parent) : QObject(parent) { + QLocale locale_; + m_DateConverted = QDate::fromString(BuildInfo::BUILD_TIME, "dd/MM/yyyy"). + toString(locale_.dateFormat(QLocale::ShortFormat)); +} AboutUtil *AboutUtil::getInstance() { @@ -27,7 +33,7 @@ AboutUtil *AboutUtil::getInstance() QString AboutUtil::buildDate() const { - return BuildInfo::BUILD_TIME; + return m_DateConverted; } QString AboutUtil::buildVersion() const diff --git a/interface/src/AboutUtil.h b/interface/src/AboutUtil.h index 94e9e7b8f3..9b65b887b9 100644 --- a/interface/src/AboutUtil.h +++ b/interface/src/AboutUtil.h @@ -35,6 +35,8 @@ public: public slots: void openUrl(const QString &url) const; private: + + QString m_DateConverted; }; #endif // hifi_AboutUtil_h diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index a1b2c93adc..269db65cd5 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -252,9 +252,12 @@ void setupPreferences() { static const QString MOVEMENT{ "VR Movement" }; { + auto getterFJ = [=]()->bool { return myAvatar->getFlyingEnabled(); }; + auto setterFJ = [=](bool value) { myAvatar->setFlyingEnabled(value); }; + preferences->addPreference(new CheckPreference(MOVEMENT, "Flying & jumping", getterFJ, setterFJ)); auto getter = [=]()->bool { return myAvatar->getSnapTurn(); }; auto setter = [=](bool value) { myAvatar->setSnapTurn(value); }; - preferences->addPreference(new CheckPreference(MOVEMENT, "Snap turn rotation", getter, setter)); + preferences->addPreference(new CheckPreference(MOVEMENT, "Snap turn / Smooth turn", getter, setter)); } //TODO: Update with advanced movement logic, test that it works