mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:23:09 +02:00
Merge pull request #12102 from cain-kilgore/21664
WL 21664 - Window.innerHeight should not include the menu bar
This commit is contained in:
commit
301731554f
2 changed files with 8 additions and 7 deletions
|
@ -182,10 +182,6 @@ bool WindowScriptingInterface::isPointOnDesktopWindow(QVariant point) {
|
||||||
return offscreenUi->isPointOnDesktopWindow(point);
|
return offscreenUi->isPointOnDesktopWindow(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec2 WindowScriptingInterface::getDeviceSize() const {
|
|
||||||
return qApp->getDeviceSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and
|
/// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and
|
||||||
/// might be in same thread as a script that sets the reticle to invisible
|
/// might be in same thread as a script that sets the reticle to invisible
|
||||||
void WindowScriptingInterface::ensureReticleVisible() const {
|
void WindowScriptingInterface::ensureReticleVisible() const {
|
||||||
|
@ -395,11 +391,15 @@ QString WindowScriptingInterface::checkVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int WindowScriptingInterface::getInnerWidth() {
|
int WindowScriptingInterface::getInnerWidth() {
|
||||||
return qApp->getWindow()->geometry().width();
|
return qApp->getDeviceSize().x;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WindowScriptingInterface::getInnerHeight() {
|
int WindowScriptingInterface::getInnerHeight() {
|
||||||
return qApp->getWindow()->geometry().height();
|
return qApp->getDeviceSize().y;
|
||||||
|
}
|
||||||
|
|
||||||
|
glm::vec2 WindowScriptingInterface::getDeviceSize() const {
|
||||||
|
return qApp->getDeviceSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
int WindowScriptingInterface::getX() {
|
int WindowScriptingInterface::getX() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// WindowScriptingInterface.cpp
|
// WindowScriptingInterface.h
|
||||||
// interface/src/scripting
|
// interface/src/scripting
|
||||||
//
|
//
|
||||||
// Created by Ryan Huffman on 4/29/14.
|
// Created by Ryan Huffman on 4/29/14.
|
||||||
|
@ -54,6 +54,7 @@ class WindowScriptingInterface : public QObject, public Dependency {
|
||||||
Q_PROPERTY(int innerHeight READ getInnerHeight)
|
Q_PROPERTY(int innerHeight READ getInnerHeight)
|
||||||
Q_PROPERTY(int x READ getX)
|
Q_PROPERTY(int x READ getX)
|
||||||
Q_PROPERTY(int y READ getY)
|
Q_PROPERTY(int y READ getY)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WindowScriptingInterface();
|
WindowScriptingInterface();
|
||||||
~WindowScriptingInterface();
|
~WindowScriptingInterface();
|
||||||
|
|
Loading…
Reference in a new issue