diff --git a/interface/interface_en.ts b/interface/interface_en.ts index 689b45afcf..913ae2c50b 100644 --- a/interface/interface_en.ts +++ b/interface/interface_en.ts @@ -4,22 +4,22 @@ Application - + Export Voxels - + Sparse Voxel Octree Files (*.svo) - + Open Script - + JavaScript Files (*.js) @@ -113,22 +113,135 @@ Menu - + Open .ini config file - - + + Text files (*.ini) - + Save .ini config file + + PreferencesDialog + + + + Cancel + + + + + + Save all changes + + + + + + + + Avatar + + + + + + <html><head/><body><p>Avatar display name <span style=" color:#909090;">(optional)</span></p></body></html> + + + + + + Not showing a name + + + + + + Head + + + + + + Body + + + + + + Advanced Tuning + + + + + + It's not recomended that you play with these settings unless you've looked into exactly what they do. + + + + + + Vertical field of view + + + + + + Lean scale (applies to Faceshift users) + + + + + + Avatar scale <span style=" color:#909090;">(default is 1.0)</span> + + + + + + Pupil dillation + + + + + + Audio Jitter Buffer Samples (0 for automatic) + + + + + + Faceshift eye detection + + + + + + Voxels + + + + + + Maximum voxels + + + + + + Max voxels sent each second + + + QObject diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 38a1bc8aaa..7373bb8833 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -714,7 +714,7 @@ void Menu::loginForCurrentDomain() { void Menu::editPreferences() { if (!_preferencesDialog) { - _preferencesDialog = new PreferencesDialog(Application::getInstance()->getGLWidget()); + _preferencesDialog = new PreferencesDialog(Application::getInstance()->getWindow()); _preferencesDialog->show(); } _preferencesDialog->raise(); diff --git a/interface/src/ui/FramelessDialog.cpp b/interface/src/ui/FramelessDialog.cpp index 2b9dd42ed7..d11fd5ae6b 100644 --- a/interface/src/ui/FramelessDialog.cpp +++ b/interface/src/ui/FramelessDialog.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "Application.h" #include "FramelessDialog.h" @@ -17,20 +18,35 @@ const int RESIZE_HANDLE_WIDTH = 7; FramelessDialog::FramelessDialog(QWidget *parent, Qt::WindowFlags flags) : - QDialog(parent, flags | Qt::FramelessWindowHint), + QDialog(parent, flags | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint), _isResizing(false) { setAttribute(Qt::WA_DeleteOnClose); installEventFilter(this); + + startTimer(20); +} + +void FramelessDialog::timerEvent(QTimerEvent *event) { + move(parentWidget()->pos().x(), parentWidget()->pos().y() + 22); + setFixedHeight(parentWidget()->size().height()); +} + +void FramelessDialog::paintEvent(QPaintEvent* event) { + //move(parentWidget()->pos()); + //resize(size().width(), parentWidget()->size().height()); } void FramelessDialog::showEvent(QShowEvent* event) { QDesktopWidget desktop; // move to upper left - move(desktop.availableGeometry().x(), desktop.availableGeometry().y()); +// move(desktop.availableGeometry().x(), desktop.availableGeometry().y()); + + move(parentWidget()->pos().x(), parentWidget()->pos().y() + 22); // keep full height - resize(size().width(), desktop.availableGeometry().height()); + setFixedHeight(parentWidget()->size().height()); +// resize(size().width(), desktop.availableGeometry().height()); } void FramelessDialog::setStyleSheetFile(const QString& fileName) { diff --git a/interface/src/ui/FramelessDialog.h b/interface/src/ui/FramelessDialog.h index 2bb8d6b85c..3cca9ec4fb 100644 --- a/interface/src/ui/FramelessDialog.h +++ b/interface/src/ui/FramelessDialog.h @@ -14,6 +14,7 @@ #include #include #include +#include class FramelessDialog : public QDialog { Q_OBJECT @@ -28,6 +29,8 @@ protected: virtual void mousePressEvent(QMouseEvent* mouseEvent); virtual void mouseReleaseEvent(QMouseEvent* mouseEvent); virtual void showEvent(QShowEvent* event); + void paintEvent(QPaintEvent* event); + void timerEvent(QTimerEvent *event); private: bool _isResizing;