mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 09:20:48 +02:00
PR comments
This commit is contained in:
parent
d28f80aa07
commit
d1d178787c
4 changed files with 28 additions and 3 deletions
|
@ -3449,6 +3449,29 @@ bool Application::isHMDMode() const {
|
||||||
}
|
}
|
||||||
float Application::getTargetFrameRate() { return getActiveDisplayPlugin()->getTargetFrameRate(); }
|
float Application::getTargetFrameRate() { return getActiveDisplayPlugin()->getTargetFrameRate(); }
|
||||||
|
|
||||||
|
QRect Application::getDesirableApplicationGeometry() {
|
||||||
|
QRect applicationGeometry = getWindow()->geometry();
|
||||||
|
|
||||||
|
// If our parent window is on the HMD, then don't use its geometry, instead use
|
||||||
|
// the "main screen" geometry.
|
||||||
|
HMDToolsDialog* hmdTools = DependencyManager::get<DialogsManager>()->getHMDToolsDialog();
|
||||||
|
if (hmdTools && hmdTools->hasHMDScreen()) {
|
||||||
|
QScreen* hmdScreen = hmdTools->getHMDScreen();
|
||||||
|
QWindow* appWindow = getWindow()->windowHandle();
|
||||||
|
QScreen* appScreen = appWindow->screen();
|
||||||
|
|
||||||
|
// if our app's screen is the hmd screen, we don't want to place the
|
||||||
|
// running scripts widget on it. So we need to pick a better screen.
|
||||||
|
// we will use the screen for the HMDTools since it's a guarenteed
|
||||||
|
// better screen.
|
||||||
|
if (appScreen == hmdScreen) {
|
||||||
|
QScreen* betterScreen = hmdTools->windowHandle()->screen();
|
||||||
|
applicationGeometry = betterScreen->geometry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return applicationGeometry;
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
// loadViewFrustum()
|
// loadViewFrustum()
|
||||||
//
|
//
|
||||||
|
|
|
@ -205,6 +205,7 @@ public:
|
||||||
glm::mat4 getEyeOffset(int eye) const;
|
glm::mat4 getEyeOffset(int eye) const;
|
||||||
glm::mat4 getEyeProjection(int eye) const;
|
glm::mat4 getEyeProjection(int eye) const;
|
||||||
|
|
||||||
|
QRect getDesirableApplicationGeometry();
|
||||||
Bookmarks* getBookmarks() const { return _bookmarks; }
|
Bookmarks* getBookmarks() const { return _bookmarks; }
|
||||||
|
|
||||||
virtual bool canAcceptURL(const QString& url) const override;
|
virtual bool canAcceptURL(const QString& url) const override;
|
||||||
|
@ -466,7 +467,7 @@ private:
|
||||||
|
|
||||||
TouchEvent _lastTouchEvent;
|
TouchEvent _lastTouchEvent;
|
||||||
|
|
||||||
RunningScriptsWidget* _runningScriptsWidget{ nullptr };
|
RunningScriptsWidget* _runningScriptsWidget { nullptr };
|
||||||
quint64 _lastNackTime;
|
quint64 _lastNackTime;
|
||||||
quint64 _lastSendDownstreamAudioStats;
|
quint64 _lastSendDownstreamAudioStats;
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ void RunningScriptsWidget::showEvent(QShowEvent* event) {
|
||||||
ui->filterLineEdit->setFocus();
|
ui->filterLineEdit->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect parentGeometry = qApp->getWindow()->geometry();
|
QRect parentGeometry = qApp->getDesirableApplicationGeometry();
|
||||||
int titleBarHeight = UIUtil::getWindowTitleBarHeight(this);
|
int titleBarHeight = UIUtil::getWindowTitleBarHeight(this);
|
||||||
int topMargin = titleBarHeight;
|
int topMargin = titleBarHeight;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ ScriptsModel& getScriptsModel() {
|
||||||
|
|
||||||
ScriptEngines::ScriptEngines()
|
ScriptEngines::ScriptEngines()
|
||||||
: _scriptsLocationHandle("scriptsLocation", DESKTOP_LOCATION),
|
: _scriptsLocationHandle("scriptsLocation", DESKTOP_LOCATION),
|
||||||
_previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION){
|
_previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION)
|
||||||
|
{
|
||||||
_scriptsModelFilter.setSourceModel(&_scriptsModel);
|
_scriptsModelFilter.setSourceModel(&_scriptsModel);
|
||||||
_scriptsModelFilter.sort(0, Qt::AscendingOrder);
|
_scriptsModelFilter.sort(0, Qt::AscendingOrder);
|
||||||
_scriptsModelFilter.setDynamicSortFilter(true);
|
_scriptsModelFilter.setDynamicSortFilter(true);
|
||||||
|
|
Loading…
Reference in a new issue