From a5b737314d931ab0a06535d799fd452939c2e270 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 11:44:15 -0800 Subject: [PATCH 01/22] Add auto-scale to preferences dialog --- interface/src/ui/PreferencesDialog.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index e27875ce67..caab326f90 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -10,6 +10,7 @@ // #include +#include #include #include @@ -26,6 +27,18 @@ const int PREFERENCES_HEIGHT_PADDING = 20; +void scaleWidgetFontSizes(QWidget* widget, float scale) { + for (auto child : widget->findChildren()) { + if (child->parent() == widget) { + scaleWidgetFontSizes(child, scale); + } + } + QFont font = widget->font(); + qDebug() << "Pref: " << widget->objectName() << ": " << font.pointSizeF(); + font.setPointSizeF(font.pointSizeF() * scale); + widget->setFont(font); +} + PreferencesDialog::PreferencesDialog(QWidget* parent) : QDialog(parent) { @@ -46,8 +59,14 @@ PreferencesDialog::PreferencesDialog(QWidget* parent) : // move dialog to left side move(parentWidget()->geometry().topLeft()); setFixedHeight(parentWidget()->size().height() - PREFERENCES_HEIGHT_PADDING); + + auto glCanvas = DependencyManager::get(); + float dpiScale = 72.0f / glCanvas->logicalDpiX(); + + scaleWidgetFontSizes(ui.scrollArea, dpiScale); } + void PreferencesDialog::accept() { savePreferences(); close(); From ab542c3599e180a09abaac2b2773d679dde51c21 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 12:21:06 -0800 Subject: [PATCH 02/22] Update DPI scaling to not update default fonts --- interface/src/ui/PreferencesDialog.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index caab326f90..56a6e33bc2 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -35,8 +35,10 @@ void scaleWidgetFontSizes(QWidget* widget, float scale) { } QFont font = widget->font(); qDebug() << "Pref: " << widget->objectName() << ": " << font.pointSizeF(); - font.setPointSizeF(font.pointSizeF() * scale); - widget->setFont(font); + if (font != QFont()) { + font.setPointSizeF(font.pointSizeF() * scale); + widget->setFont(font); + } } PreferencesDialog::PreferencesDialog(QWidget* parent) : @@ -61,9 +63,11 @@ PreferencesDialog::PreferencesDialog(QWidget* parent) : setFixedHeight(parentWidget()->size().height() - PREFERENCES_HEIGHT_PADDING); auto glCanvas = DependencyManager::get(); + + // All font sizes are based on 72 DPI. float dpiScale = 72.0f / glCanvas->logicalDpiX(); - scaleWidgetFontSizes(ui.scrollArea, dpiScale); + scaleWidgetFontSizes(this, dpiScale); } From 18a92464b5666f909b0575924215fdbad9552d3d Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 12:23:56 -0800 Subject: [PATCH 03/22] Remove custom font sizes on preferences dialog --- interface/ui/preferencesDialog.ui | 5 ----- 1 file changed, 5 deletions(-) diff --git a/interface/ui/preferencesDialog.ui b/interface/ui/preferencesDialog.ui index e9b0f43924..c413ed1266 100644 --- a/interface/ui/preferencesDialog.ui +++ b/interface/ui/preferencesDialog.ui @@ -133,7 +133,6 @@ Arial - 14 @@ -194,7 +193,6 @@ Arial - 14 @@ -276,7 +274,6 @@ Arial - 14 @@ -388,7 +385,6 @@ Arial - 13 @@ -508,7 +504,6 @@ Arial - 13 From f44ec6da1295363b3643c94706fe358dd0606750 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 12:49:11 -0800 Subject: [PATCH 04/22] Set global font size in preferencesDialog --- interface/ui/preferencesDialog.ui | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/ui/preferencesDialog.ui b/interface/ui/preferencesDialog.ui index c413ed1266..6435f87f24 100644 --- a/interface/ui/preferencesDialog.ui +++ b/interface/ui/preferencesDialog.ui @@ -28,6 +28,11 @@ 16777215 + + + 13 + + From 0d60c09d03c60eabe16733ea02a723f94b7c7071 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:33:19 -0800 Subject: [PATCH 05/22] Add UI font scaling to UIUtil --- interface/src/UIUtil.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ interface/src/UIUtil.h | 3 +++ 2 files changed, 43 insertions(+) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index 3be6a824fa..5d01ddaa3d 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -12,6 +12,9 @@ #include #include +#include "DependencyManager.h" +#include "GLCanvas.h" + #include "UIUtil.h" int UIUtil::getWindowTitleBarHeight(const QWidget* window) { @@ -27,3 +30,40 @@ int UIUtil::getWindowTitleBarHeight(const QWidget* window) { return titleBarHeight; } + +// When setting the font size of a widget in points, the rendered text will be larger +// on Windows and Linux than on Mac OSX. This is because Windows and Linux use a DPI +// of 96, while OSX uses 72. +// In order to get consistent results across platforms, the font sizes need to be scaled +// based on the system DPI. +// This function will scale the font size of widget and all +// of its children recursively. +void UIUtil::scaleWidgetFontSizes(QWidget* widget) { + auto glCanvas = DependencyManager::get(); + + // This is the base dpi that we are targetting. This is based on Mac OSXs default DPI, + // and is the basis for all font sizes. + const float BASE_DPI = 72.0f; + +#ifdef Q_OS_MAC + const float NATIVE_DPI = 72.0f; +#else + const float NATIVE_DPI = 96.0f; +#endif + + float fontScale = (BASE_DPI / NATIVE_DPI) * (glCanvas->logicalDpiX() / NATIVE_DPI); + + internalScaleWidgetFontSizes(widget, fontScale); +} + +void UIUtil::internalScaleWidgetFontSizes(QWidget* widget, float scale) { + for (auto child : widget->findChildren()) { + if (child->parent() == widget) { + internalScaleWidgetFontSizes(child, scale); + } + } + + QFont font = widget->font(); + font.setPointSizeF(font.pointSizeF() * scale); + widget->setFont(font); +} diff --git a/interface/src/UIUtil.h b/interface/src/UIUtil.h index f9dc669840..0866101ebe 100644 --- a/interface/src/UIUtil.h +++ b/interface/src/UIUtil.h @@ -18,7 +18,10 @@ class UIUtil { public: static int getWindowTitleBarHeight(const QWidget* window); + static void scaleWidgetFontSizes(QWidget* widget); +private: + static void internalScaleWidgetFontSizes(QWidget* widget, float scale); }; #endif // hifi_UIUtil_h From ba66155d4653300fc701e62615bed73c2ea704d0 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:33:39 -0800 Subject: [PATCH 06/22] Add font scaling to login dialog --- interface/src/ui/LoginDialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index 049e5bd1cd..3f0a69e578 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -21,6 +21,7 @@ #include "AccountManager.h" #include "ui_loginDialog.h" #include "LoginDialog.h" +#include "UIUtil.h" const QString FORGOT_PASSWORD_URL = "https://metaverse.highfidelity.io/users/password/new"; @@ -41,6 +42,8 @@ LoginDialog::LoginDialog(QWidget* parent) : this, &LoginDialog::handleLoginClicked); connect(_ui->closeButton, &QPushButton::clicked, this, &LoginDialog::close); + + UIUtil::scaleWidgetFontSizes(this); }; LoginDialog::~LoginDialog() { From 9550339a2a80a021c03cd63e8731a606a1a5168e Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:34:01 -0800 Subject: [PATCH 07/22] Move preferences dialog font scaling to UIUtil --- interface/src/ui/PreferencesDialog.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index 56a6e33bc2..29035dacd1 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -24,23 +24,10 @@ #include "PreferencesDialog.h" #include "Snapshot.h" #include "UserActivityLogger.h" +#include "UIUtil.h" const int PREFERENCES_HEIGHT_PADDING = 20; -void scaleWidgetFontSizes(QWidget* widget, float scale) { - for (auto child : widget->findChildren()) { - if (child->parent() == widget) { - scaleWidgetFontSizes(child, scale); - } - } - QFont font = widget->font(); - qDebug() << "Pref: " << widget->objectName() << ": " << font.pointSizeF(); - if (font != QFont()) { - font.setPointSizeF(font.pointSizeF() * scale); - widget->setFont(font); - } -} - PreferencesDialog::PreferencesDialog(QWidget* parent) : QDialog(parent) { @@ -67,7 +54,7 @@ PreferencesDialog::PreferencesDialog(QWidget* parent) : // All font sizes are based on 72 DPI. float dpiScale = 72.0f / glCanvas->logicalDpiX(); - scaleWidgetFontSizes(this, dpiScale); + UIUtil::scaleWidgetFontSizes(this); } From e048f7a36c53bb1e431832862e57c8610fd12d5e Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:34:28 -0800 Subject: [PATCH 08/22] Add font scaling to running scripts window --- interface/src/ui/RunningScriptsWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/src/ui/RunningScriptsWidget.cpp b/interface/src/ui/RunningScriptsWidget.cpp index 4346d813bb..86944e8cfd 100644 --- a/interface/src/ui/RunningScriptsWidget.cpp +++ b/interface/src/ui/RunningScriptsWidget.cpp @@ -64,6 +64,8 @@ RunningScriptsWidget::RunningScriptsWidget(QWidget* parent) : connect(ui->loadScriptFromURLButton, &QPushButton::clicked, Application::getInstance(), &Application::loadScriptURLDialog); connect(&_signalMapper, SIGNAL(mapped(QString)), Application::getInstance(), SLOT(stopScript(const QString&))); + + UIUtil::scaleWidgetFontSizes(this); } RunningScriptsWidget::~RunningScriptsWidget() { From a069a2f21c95500b5154f7b83440cdba09183412 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:34:48 -0800 Subject: [PATCH 09/22] Add default font to running scripts window --- interface/ui/runningScriptsWidget.ui | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/ui/runningScriptsWidget.ui b/interface/ui/runningScriptsWidget.ui index ec078681e3..34b288ad7a 100644 --- a/interface/ui/runningScriptsWidget.ui +++ b/interface/ui/runningScriptsWidget.ui @@ -10,6 +10,12 @@ 728 + + + Helvetica,Arial,sans-serif + 13 + + Running Scripts From 4a383ff17723d472b61d6ead1ef96f622b2fd453 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 13:56:41 -0800 Subject: [PATCH 10/22] Update font sizes in running scripts panel --- interface/ui/runningScriptsWidget.ui | 37 ++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/interface/ui/runningScriptsWidget.ui b/interface/ui/runningScriptsWidget.ui index 34b288ad7a..0e6aebf9ac 100644 --- a/interface/ui/runningScriptsWidget.ui +++ b/interface/ui/runningScriptsWidget.ui @@ -37,6 +37,12 @@ 141 + + + Helvetica,Arial,sans-serif + 13 + + 0 @@ -197,8 +203,14 @@ font: bold 16pt; 0 + + + Helvetica,Arial,sans-serif + 14 + + - font: 14pt; color: #5f5f5f; margin: 2px; + color: #5f5f5f; margin: 2px; There are no scripts running. @@ -261,12 +273,15 @@ font: bold 16pt; 0 + + + Helvetica,Arial,sans-serif + 14 + + Qt::LeftToRight - - font-size: 14pt; - 0 @@ -285,6 +300,12 @@ font: bold 16pt; + + + Helvetica,Arial,sans-serif + 14 + + 0 @@ -306,8 +327,14 @@ font: bold 16pt; + + + Helvetica,Arial,sans-serif + 14 + + - font: 14pt; color: #5f5f5f; margin: 2px; + color: #5f5f5f; margin: 2px; Tip From ff1fb07b2d2241ed760e27ef9eb9f62deea6ce32 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 14:04:02 -0800 Subject: [PATCH 11/22] Add high-dpi support to scaleWidgetFontSizes --- interface/src/UIUtil.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index 5d01ddaa3d..27f40539a4 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -51,7 +51,14 @@ void UIUtil::scaleWidgetFontSizes(QWidget* widget) { const float NATIVE_DPI = 96.0f; #endif - float fontScale = (BASE_DPI / NATIVE_DPI) * (glCanvas->logicalDpiX() / NATIVE_DPI); + // Scale fonts based on the native dpi. On Windows, where the native DPI is 96, + // the scale will be: 72.0 / 96.0 = 0.75 + float fontScale = (BASE_DPI / NATIVE_DPI); + + // Scale the font further by the system's DPI settings. If using a 2x high-dpi screen + // on Windows, for example, the font will be further scaled by: 192.0 / 96.0 = 2.0 + // This would give a final scale of: 0.75 * 2.0 = 1.5 + fontScale *= (glCanvas->logicalDpiX() / NATIVE_DPI); internalScaleWidgetFontSizes(widget, fontScale); } From 7dab39a2f19d3ed3336baf4fcb873764f67f65a5 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 14:16:33 -0800 Subject: [PATCH 12/22] Add qDebug message to scaleWidgetFontSizes --- interface/src/UIUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index 27f40539a4..d39b3229aa 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -60,6 +60,8 @@ void UIUtil::scaleWidgetFontSizes(QWidget* widget) { // This would give a final scale of: 0.75 * 2.0 = 1.5 fontScale *= (glCanvas->logicalDpiX() / NATIVE_DPI); + qDebug() << "Scaling widgets by: " << fontScale; + internalScaleWidgetFontSizes(widget, fontScale); } From b2e1d8a38c6941e82641c65e1298cd53cf8664f4 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 14:37:56 -0800 Subject: [PATCH 13/22] Remove font scaling based on system DPI --- interface/src/UIUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index d39b3229aa..9de2ad35e9 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -58,7 +58,7 @@ void UIUtil::scaleWidgetFontSizes(QWidget* widget) { // Scale the font further by the system's DPI settings. If using a 2x high-dpi screen // on Windows, for example, the font will be further scaled by: 192.0 / 96.0 = 2.0 // This would give a final scale of: 0.75 * 2.0 = 1.5 - fontScale *= (glCanvas->logicalDpiX() / NATIVE_DPI); + // fontScale *= (glCanvas->logicalDpiX() / NATIVE_DPI); qDebug() << "Scaling widgets by: " << fontScale; From 51f5719e0ff90577f6d6e07a38e7bb9da2ce0674 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 14:59:52 -0800 Subject: [PATCH 14/22] Update font sizes in running scripts window --- interface/ui/runningScriptsWidget.ui | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/interface/ui/runningScriptsWidget.ui b/interface/ui/runningScriptsWidget.ui index 0e6aebf9ac..852d61a7ba 100644 --- a/interface/ui/runningScriptsWidget.ui +++ b/interface/ui/runningScriptsWidget.ui @@ -125,6 +125,12 @@ font: bold 16pt; 0 + + + Helvetica,Arial,sans-serif + 13 + + reloadStopButtonArea { padding: 0 } @@ -143,6 +149,12 @@ font: bold 16pt; + + + Helvetica,Arial,sans-serif + 13 + + Reload all @@ -150,6 +162,12 @@ font: bold 16pt; + + + Helvetica,Arial,sans-serif + 13 + + Stop all @@ -179,6 +197,12 @@ font: bold 16pt; 0 + + + Helvetica,Arial,sans-serif + 13 + + 0 From 2828b65bea550500bdcde6b8523278cd6ab4d278 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 15:09:41 -0800 Subject: [PATCH 15/22] Add scaling for high-dpi Windows/Linux displays --- .../src/scripting/ControllerScriptingInterface.cpp | 14 +++++++++++++- interface/src/ui/ApplicationOverlay.cpp | 12 +++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/ControllerScriptingInterface.cpp b/interface/src/scripting/ControllerScriptingInterface.cpp index 929a763e70..a871adeb08 100644 --- a/interface/src/scripting/ControllerScriptingInterface.cpp +++ b/interface/src/scripting/ControllerScriptingInterface.cpp @@ -271,7 +271,19 @@ void ControllerScriptingInterface::releaseJoystick(int joystickIndex) { glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { auto glCanvas = DependencyManager::get(); - return glm::vec2(glCanvas->width(), glCanvas->height()); +#ifdef Q_OS_MAC + const float dpiScaleX = 1.0f; + const float dpiScaleY = 1.0f; +#else + const float NATIVE_DPI = 96.0f; + const float dpiScaleX = NATIVE_DPI / glCanvas->logicalDpiX(); + const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); +#endif + + const float width = glCanvas->width() / dpiScaleX; + const float height = glCanvas->height() / dpiScaleY; + + return glm::vec2(width, height); } AbstractInputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index f9437221e5..16d6dbca02 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -203,7 +203,17 @@ void ApplicationOverlay::renderOverlay(bool renderToTexture) { const float NEAR_CLIP = -10000; const float FAR_CLIP = 10000; glLoadIdentity(); - glOrtho(0, glCanvas->width(), glCanvas->height(), 0, NEAR_CLIP, FAR_CLIP); + +#ifdef Q_OS_MAC + // OSX will take care of scaling for us + const float dpiScaleX = 1.0f; + const float dpiScaleY = 1.0f; +#else + const float NATIVE_DPI = 96.0f; + const float dpiScaleX = NATIVE_DPI / glCanvas->logicalDpiX(); + const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); +#endif + glOrtho(0, glCanvas->width() * dpiScaleX, glCanvas->height() * dpiScaleY, 0, NEAR_CLIP, FAR_CLIP); glMatrixMode(GL_MODELVIEW); From 9b719273ab1aa2e8fe3e9111d390d512aad6cc51 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 15:30:39 -0800 Subject: [PATCH 16/22] Fix dpi scaling in getViewportDimensions --- interface/src/scripting/ControllerScriptingInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/ControllerScriptingInterface.cpp b/interface/src/scripting/ControllerScriptingInterface.cpp index a871adeb08..1c9cccf26f 100644 --- a/interface/src/scripting/ControllerScriptingInterface.cpp +++ b/interface/src/scripting/ControllerScriptingInterface.cpp @@ -280,8 +280,8 @@ glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); #endif - const float width = glCanvas->width() / dpiScaleX; - const float height = glCanvas->height() / dpiScaleY; + const float width = glCanvas->width() * dpiScaleX; + const float height = glCanvas->height() * dpiScaleY; return glm::vec2(width, height); } From 22d46e3e6ba239407f5d8c49fe18b6815e679be9 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 15:33:24 -0800 Subject: [PATCH 17/22] Update runningscripts script font to match parent --- interface/src/ui/RunningScriptsWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/src/ui/RunningScriptsWidget.cpp b/interface/src/ui/RunningScriptsWidget.cpp index 86944e8cfd..9ff600675f 100644 --- a/interface/src/ui/RunningScriptsWidget.cpp +++ b/interface/src/ui/RunningScriptsWidget.cpp @@ -105,6 +105,7 @@ void RunningScriptsWidget::setRunningScripts(const QStringList& list) { hash.insert(list.at(i), 1); } QWidget* row = new QWidget(ui->scriptListWidget); + row->setFont(ui->scriptListWidget->font()); row->setLayout(new QHBoxLayout(row)); QUrl url = QUrl(list.at(i)); From 03eb1a984f5501a655b1fd81840a22dfd4c5d8a3 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 16:15:53 -0800 Subject: [PATCH 18/22] Revert "Fix dpi scaling in getViewportDimensions" This reverts commit 9b719273ab1aa2e8fe3e9111d390d512aad6cc51. --- interface/src/scripting/ControllerScriptingInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/ControllerScriptingInterface.cpp b/interface/src/scripting/ControllerScriptingInterface.cpp index 1c9cccf26f..a871adeb08 100644 --- a/interface/src/scripting/ControllerScriptingInterface.cpp +++ b/interface/src/scripting/ControllerScriptingInterface.cpp @@ -280,8 +280,8 @@ glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); #endif - const float width = glCanvas->width() * dpiScaleX; - const float height = glCanvas->height() * dpiScaleY; + const float width = glCanvas->width() / dpiScaleX; + const float height = glCanvas->height() / dpiScaleY; return glm::vec2(width, height); } From 4751974c459ac25f5e29ec4b60037bdcd32b82cb Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 16:16:50 -0800 Subject: [PATCH 19/22] Revert "Add scaling for high-dpi Windows/Linux displays" This reverts commit 2828b65bea550500bdcde6b8523278cd6ab4d278. --- .../src/scripting/ControllerScriptingInterface.cpp | 14 +------------- interface/src/ui/ApplicationOverlay.cpp | 12 +----------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/interface/src/scripting/ControllerScriptingInterface.cpp b/interface/src/scripting/ControllerScriptingInterface.cpp index a871adeb08..929a763e70 100644 --- a/interface/src/scripting/ControllerScriptingInterface.cpp +++ b/interface/src/scripting/ControllerScriptingInterface.cpp @@ -271,19 +271,7 @@ void ControllerScriptingInterface::releaseJoystick(int joystickIndex) { glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { auto glCanvas = DependencyManager::get(); -#ifdef Q_OS_MAC - const float dpiScaleX = 1.0f; - const float dpiScaleY = 1.0f; -#else - const float NATIVE_DPI = 96.0f; - const float dpiScaleX = NATIVE_DPI / glCanvas->logicalDpiX(); - const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); -#endif - - const float width = glCanvas->width() / dpiScaleX; - const float height = glCanvas->height() / dpiScaleY; - - return glm::vec2(width, height); + return glm::vec2(glCanvas->width(), glCanvas->height()); } AbstractInputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 16d6dbca02..f9437221e5 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -203,17 +203,7 @@ void ApplicationOverlay::renderOverlay(bool renderToTexture) { const float NEAR_CLIP = -10000; const float FAR_CLIP = 10000; glLoadIdentity(); - -#ifdef Q_OS_MAC - // OSX will take care of scaling for us - const float dpiScaleX = 1.0f; - const float dpiScaleY = 1.0f; -#else - const float NATIVE_DPI = 96.0f; - const float dpiScaleX = NATIVE_DPI / glCanvas->logicalDpiX(); - const float dpiScaleY = NATIVE_DPI / glCanvas->logicalDpiY(); -#endif - glOrtho(0, glCanvas->width() * dpiScaleX, glCanvas->height() * dpiScaleY, 0, NEAR_CLIP, FAR_CLIP); + glOrtho(0, glCanvas->width(), glCanvas->height(), 0, NEAR_CLIP, FAR_CLIP); glMatrixMode(GL_MODELVIEW); From a8999964f6dbb266e8bbf5bc9eba8aed13d6b024 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Feb 2015 16:21:51 -0800 Subject: [PATCH 20/22] Cleanup dpi scaling comments --- interface/src/UIUtil.cpp | 14 +++----------- interface/src/ui/PreferencesDialog.cpp | 6 ------ 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index 9de2ad35e9..c907c2b8e9 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -33,9 +33,8 @@ int UIUtil::getWindowTitleBarHeight(const QWidget* window) { // When setting the font size of a widget in points, the rendered text will be larger // on Windows and Linux than on Mac OSX. This is because Windows and Linux use a DPI -// of 96, while OSX uses 72. -// In order to get consistent results across platforms, the font sizes need to be scaled -// based on the system DPI. +// of 96, while OSX uses 72. In order to get consistent results across platforms, the +// font sizes need to be scaled based on the system DPI. // This function will scale the font size of widget and all // of its children recursively. void UIUtil::scaleWidgetFontSizes(QWidget* widget) { @@ -53,14 +52,7 @@ void UIUtil::scaleWidgetFontSizes(QWidget* widget) { // Scale fonts based on the native dpi. On Windows, where the native DPI is 96, // the scale will be: 72.0 / 96.0 = 0.75 - float fontScale = (BASE_DPI / NATIVE_DPI); - - // Scale the font further by the system's DPI settings. If using a 2x high-dpi screen - // on Windows, for example, the font will be further scaled by: 192.0 / 96.0 = 2.0 - // This would give a final scale of: 0.75 * 2.0 = 1.5 - // fontScale *= (glCanvas->logicalDpiX() / NATIVE_DPI); - - qDebug() << "Scaling widgets by: " << fontScale; + float fontScale = BASE_DPI / NATIVE_DPI; internalScaleWidgetFontSizes(widget, fontScale); } diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index 29035dacd1..1a3ad541c9 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -49,15 +49,9 @@ PreferencesDialog::PreferencesDialog(QWidget* parent) : move(parentWidget()->geometry().topLeft()); setFixedHeight(parentWidget()->size().height() - PREFERENCES_HEIGHT_PADDING); - auto glCanvas = DependencyManager::get(); - - // All font sizes are based on 72 DPI. - float dpiScale = 72.0f / glCanvas->logicalDpiX(); - UIUtil::scaleWidgetFontSizes(this); } - void PreferencesDialog::accept() { savePreferences(); close(); From 4a8e3193a9c44292df6458fc63106b4605179f6e Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 19 Feb 2015 12:01:27 -0800 Subject: [PATCH 21/22] Add more comments to UIUtil::scaleWidgetFontSizes --- interface/src/UIUtil.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interface/src/UIUtil.cpp b/interface/src/UIUtil.cpp index c907c2b8e9..19d3a51917 100644 --- a/interface/src/UIUtil.cpp +++ b/interface/src/UIUtil.cpp @@ -37,6 +37,12 @@ int UIUtil::getWindowTitleBarHeight(const QWidget* window) { // font sizes need to be scaled based on the system DPI. // This function will scale the font size of widget and all // of its children recursively. +// +// When creating widgets, if a font size isn't explicitly set Qt will choose a +// reasonable, but often different font size across platforms. This means +// YOU SHOUD EXPLICITLY SET ALL FONT SIZES and call this function OR not use +// this function at all. If you mix both you will end up with inconsistent results +// across platforms. void UIUtil::scaleWidgetFontSizes(QWidget* widget) { auto glCanvas = DependencyManager::get(); @@ -57,6 +63,8 @@ void UIUtil::scaleWidgetFontSizes(QWidget* widget) { internalScaleWidgetFontSizes(widget, fontScale); } +// Depth-first traversal through widget hierarchy. It is important to do a depth-first +// traversal because modifying the font size of a parent node can affect children. void UIUtil::internalScaleWidgetFontSizes(QWidget* widget, float scale) { for (auto child : widget->findChildren()) { if (child->parent() == widget) { From 4dfe7257214925bc4a7a91f2e52ad8d31ca8fe6d Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 19 Feb 2015 14:02:15 -0800 Subject: [PATCH 22/22] Update preferences dialog to use layouts throughout --- interface/ui/preferencesDialog.ui | 4608 +++++++++++++++-------------- 1 file changed, 2316 insertions(+), 2292 deletions(-) diff --git a/interface/ui/preferencesDialog.ui b/interface/ui/preferencesDialog.ui index 6435f87f24..13894a2592 100644 --- a/interface/ui/preferencesDialog.ui +++ b/interface/ui/preferencesDialog.ui @@ -33,1075 +33,567 @@ 13 - - - - 0 - 0 - 500 - 491 - - - - - 0 - 0 - - - - QFrame::NoFrame - - - QFrame::Plain - - + + 0 - - true + + 0 - - - - 0 - -825 - 485 - 1611 - - - - + + 0 + + + 0 + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + 0 - - 30 + + true - - 0 - - - 30 - - - 30 - - - - - - 0 - 40 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Avatar basics - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - 0 - - - - - - - - 0 - 0 - - - - - 0 - 28 - - - - - Arial - - - - <html><head/><body><p>Avatar display name <span style=" color:#909090;">(optional)</span></p></body></html> - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - displayNameEdit - - - - - - - - 0 - 0 - - - - - 280 - 0 - - - - - Arial - - - - Qt::LeftToRight - - - - - - Not showing a name - - - - - - - - 0 - 0 - - - - - 0 - 28 - - - - - Arial - - - - Head - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - 0 - - - snapshotLocationEdit - - - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 5 - 20 - - - - - - - - - Arial - - - - Browse - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - 0 - 28 - - - - - Arial - - - - Body - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - skeletonURLEdit - - - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 5 - 20 - - - - - - - - - Arial - - - - Browse - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Snapshots - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - Arial - - - - Place my Snapshots here: - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - 0 - - - snapshotLocationEdit - - - - - - - - - - 0 - 0 - - - - - Arial - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 5 - 20 - - - - - - - - - Arial - - - - Browse - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Scripts - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - Arial - - - - Load scripts from this directory: - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - 0 - - - snapshotLocationEdit - - - - - - - - - - 0 - 0 - - - - - Arial - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 5 - 20 - - - - - - - - - Arial - - - - Browse - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - 150 - 0 - - - - - 300 - 0 - - - - - Arial - - - - Load Default Scripts - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Privacy - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - 0 - - - snapshotLocationEdit - - - - - - - - 0 - 0 - - - - - 32 - 28 - - - - - 0 - 0 - - - - - Arial - - - - Send data - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Avatar tuning - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - + + + + 0 + -107 + 485 + 1550 + + + 0 - - 7 + + 30 - + 0 + + 30 + - 7 + 30 - + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + Arial + 18 + 75 + true - + color:#29967e; - Real world vertical field of view (angular size of monitor) + Avatar basics - + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + 0 - - fieldOfViewSpin + + 7 - + + 7 + + + + + + Arial + + + + <html><head/><body><p>Avatar display name <span style=" color:#909090;">(optional)</span></p></body></html> + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + displayNameEdit + + + + + + + 4 + + + 140 + + + 4 + + + + + + Arial + + + + Qt::LeftToRight + + + Not showing a name + + + + + + - - - - Arial - - - - Qt::Horizontal - - - - 0 - 0 - - - - - - - - - 100 - 0 - - - - - 95 - 36 - - - - - Arial - - - - 1 - - - 180 - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - - - - Vertical field of view - - + + 0 - - fieldOfViewSpin + + 7 - + + 7 + + + + + + Arial + + + + Head + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + snapshotLocationEdit + + + + + + + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 5 + 20 + + + + + + + + + Arial + + + + Browse + + + + 0 + 0 + + + + + + + - - - - Arial - - - - Qt::Horizontal - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 95 - 36 - - - - - Arial - - - - 1 - - - 180 - - - - - - - - - 0 - - - 8 - - - 8 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 25 - - - - - Arial - - - - Lean scale (applies to Faceshift users) - - + + 0 - - leanScaleSpin + + 7 - + + 7 + + + + + + Arial + + + + Body + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + skeletonURLEdit + + + + + + + 0 + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 5 + 20 + + + + + + + + + Arial + + + + Browse + + + + 0 + 0 + + + + + + + - - - - Arial - - + - Qt::Horizontal + Qt::Vertical - QSizePolicy::Expanding + QSizePolicy::Fixed - 40 - 10 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - Arial - - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Avatar scale <span style=" color:#909090;">(default is 1.0)</span> - - - 0 - - - avatarScaleSpin - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 + 20 20 - - - - 100 - 0 - - - - - 70 - 16777215 - - + Arial + 18 + 75 + true - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + + color:#29967e - Pupil dillation + Snapshots - - 0 - - - pupilDilationSlider + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 0 + + 7 + + + 0 + + + + + + Arial + + + + Place my Snapshots here: + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + 0 + + + snapshotLocationEdit + + + + + + + 0 + + + + + + Arial + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 5 + 20 + + + + + + + + + Arial + + + + Browse + + + + 0 + 0 + + + + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - + + + + Arial + 18 + 75 + true + + + + color:#29967e + + + Scripts + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + 0 + + + 7 + + + 0 + + + + + + Arial + + + + Load scripts from this directory: + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + 0 + + + snapshotLocationEdit + + + + + + + 0 + + + + + + 0 + 0 + + + + + Arial + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 5 + 20 + + + + + + + + + Arial + + + + Browse + + + + 0 + 0 + + + + + + + + + + 0 @@ -1110,1456 +602,1988 @@ - 130 + 150 + 0 + + + + + 300 0 - - - Arial - - - - Qt::Horizontal - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - Arial - Faceshift eye detection - - - 0 - - - faceshiftEyeDeflectionSider + Load Default Scripts - - - - Arial - - + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - + + + + Arial + 18 + 75 + true + + + + color:#29967e + + + Privacy + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + 0 + + + snapshotLocationEdit + + + + + - + 0 0 - 130 - 0 + 32 + 28 - - - Arial - - - - Qt::Horizontal - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Faceshift hostname - - - 0 - - - faceshiftHostnameEdit - - - - - - - - Arial - - - - Qt::Horizontal - - + 0 0 - - - - Arial - - Qt::LeftToRight + + Send data + + + + 0 + 0 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + Arial + 18 + 75 + true + - - - - localhost - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Audio - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - 0 - 40 - - - - - Arial - - - - Enable Dynamic Jitter Buffers - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + color:#29967e - Static Jitter Buffer Frames + Avatar tuning - - 0 - - - staticDesiredJitterBufferFramesSpin + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 0 + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + + + + Real world vertical field of view (angular size of monitor) + + + 0 + + + fieldOfViewSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + 100 + 0 + + + + + 95 + 36 + + + + + Arial + + + + 1 + + + 180 + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + + + + Vertical field of view + + + 0 + + + fieldOfViewSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 95 + 36 + + + + + Arial + + + + 1 + + + 180 + + + + + + + + + 0 + + + 8 + + + 8 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 25 + + + + + Arial + + + + Lean scale (applies to Faceshift users) + + + 0 + + + leanScaleSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 10 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + Arial + + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Avatar scale <span style=" color:#909090;">(default is 1.0)</span> + + + 0 + + + avatarScaleSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Pupil dillation + + + 0 + + + pupilDilationSlider + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 130 + 0 + + + + + Arial + + + + Qt::Horizontal + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Faceshift eye detection + + + 0 + + + faceshiftEyeDeflectionSider + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 130 + 0 + + + + + Arial + + + + Qt::Horizontal + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Faceshift hostname + + + 0 + + + faceshiftHostnameEdit + + + + + + + + Arial + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + Arial + + + + Qt::LeftToRight + + + + + + localhost + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - - - - 0 - 0 - - - - - 100 - 0 - - + Arial + 18 + 75 + true - - 0 - - - 10000 - - - 1 - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + + color:#29967e - Max Frames Over Desired + Audio - - 0 - - - maxFramesOverDesiredSpin + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 7 + + 7 + + + + + + 0 + 40 + + + + + Arial + + + + Enable Dynamic Jitter Buffers + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Static Jitter Buffer Frames + + + 0 + + + staticDesiredJitterBufferFramesSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + Arial + + + + 0 + + + 10000 + + + 1 + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Max Frames Over Desired + + + 0 + + + maxFramesOverDesiredSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + Arial + + + + 0 + + + 10000 + + + 1 + + + + + + + + + 7 + + + 7 + + + + + + 0 + 32 + + + + + Arial + + + + Use Stdev for Dynamic Jitter Calc + + + + 32 + 32 + + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Window A Starve Threshold + + + 0 + + + windowStarveThresholdSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 0 + + + 10000 + + + 1 + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Window A (raise desired on N starves) Seconds + + + 0 + + + windowSecondsForDesiredCalcOnTooManyStarvesSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 0 + + + 10000 + + + 1 + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Window B (desired ceiling) Seconds + + + 0 + + + windowSecondsForDesiredReductionSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 0 + + + 10000 + + + 1 + + + + + + + + + 7 + + + 7 + + + + + + 0 + 0 + + + + + Arial + + + + Repetition with Fade + + + + 32 + 32 + + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Output Buffer Size (Frames) + + + 0 + + + windowSecondsForDesiredReductionSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 1 + + + 20 + + + 1 + + + + + + + + + 7 + + + 7 + + + + + + 0 + 0 + + + + + Arial + + + + Output Starve Detection (Automatic Buffer Size Increase) + + + + 32 + 32 + + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Output Starve Detection Threshold + + + 0 + + + windowSecondsForDesiredReductionSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 1 + + + 500 + + + 1 + + + + + + + + + 0 + + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Output Starve Detection Period (ms) + + + 0 + + + windowSecondsForDesiredReductionSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + 70 + 16777215 + + + + + Arial + + + + 1 + + + 999999999 + + + 1 + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - - - - 100 - 0 - - + Arial + 18 + 75 + true - - 0 - - - 10000 - - - 1 - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - 0 - 32 - - - - - Arial - - - - Use Stdev for Dynamic Jitter Calc - - - - 32 - 32 - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + + color:#29967e - Window A Starve Threshold + Octree - - 0 - - - windowStarveThresholdSpin + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 0 + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + Max packets sent each second + + + 0 + + + maxOctreePPSSpin + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + Arial + + + + 60 + + + 6000 + + + 10 + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - + Arial + 18 + 75 + true - - 0 - - - 10000 - - - 1 - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + + color:#29967e - Window A (raise desired on N starves) Seconds + Oculus Rift - - 0 - - - windowSecondsForDesiredCalcOnTooManyStarvesSpin + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 0 + + 7 + + + 0 + + + 7 + + + + + + Arial + + + + User Interface Angular Size + + + 0 + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + Arial + + + + 30 + + + 160 + + + 1 + + + 72 + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Fixed - 40 + 20 20 - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - + Arial + 18 + 75 + true - - 0 - - - 10000 - - - 1 - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - + + color:#29967e - Window B (desired ceiling) Seconds + Sixense Controllers - - 0 - - - windowSecondsForDesiredReductionSpin + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - Arial - + + + 7 - - Qt::Horizontal + + 7 - - - 40 - 20 - - - + + + + + 0 + 40 + + + + + Arial + + + + Invert Mouse Buttons + + + + 0 + 0 + + + + + - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - - - - Arial - - - + + 0 - - 10000 + + 7 - - 1 + + 0 - + + 7 + + + + + + Arial + + + + Reticle Movement Speed + + + 0 + + + + + + + + Arial + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + Arial + + + + 100 + + + 1 + + + 50 + + + + - - - - - - 0 - 0 - - - - - 32 - 40 - - - - - 0 - 0 - - - - - Arial - - - - Repetition with Fade - - - - 32 - 32 - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Output Buffer Size (Frames) - - - 0 - - - windowSecondsForDesiredReductionSpin - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - - - - Arial - - - - 1 - - - 20 - - - 1 - - - - - - - - - - 0 - 0 - - - - - 32 - 40 - - - - - 0 - 0 - - - - - Arial - - - - Output Starve Detection (Automatic Buffer Size Increase) - - - - 32 - 32 - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Output Starve Detection Threshold - - - 0 - - - windowSecondsForDesiredReductionSpin - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - - - - Arial - - - - 1 - - - 500 - - - 1 - - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Output Starve Detection Period (ms) - - - 0 - - - windowSecondsForDesiredReductionSpin - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 70 - 16777215 - - - - - Arial - - - - 1 - - - 999999999 - - - 1 - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Octree - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Max packets sent each second - - - 0 - - - maxOctreePPSSpin - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 100 - 0 - - - - - Arial - - - - 60 - - - 6000 - - - 10 - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Oculus Rift - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - User Interface Angular Size - - - 0 - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 100 - 0 - - - - - Arial - - - - 30 - - - 160 - - - 1 - - - 72 - - - - - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - Arial - 18 - 75 - true - - - - color:#29967e - - - Sixense Controllers - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 0 - 35 - - - - - 0 - 40 - - - - - Arial - - - - Invert Mouse Buttons - - - - 0 - 0 - - - - - - - - 0 - - - 7 - - - 0 - - - 7 - - - - - - Arial - - - - Reticle Movement Speed - - - 0 - - - - - - - - Arial - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 100 - 0 - - - - - Arial - - - - 100 - - - 1 - - - 50 - - - - - - - - - - - - 0 - 490 - 501 - 50 - - - - QFrame::NoFrame - - - QFrame::Raised - - - - - 0 - 0 - 491 - 41 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - Arial - - - - Cancel - - - false - - - - - - - - Arial - - - - Save all changes - - - true - - - false - - - - - - + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + Arial + + + + Cancel + + + false + + + + + + + + Arial + + + + Save all changes + + + true + + + false + + + + + + + + +