mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
WL 21664 - Window.innerHeight should not include the menu bar
This commit is contained in:
parent
c33c637f07
commit
47038e4349
2 changed files with 13 additions and 6 deletions
|
@ -176,10 +176,6 @@ bool WindowScriptingInterface::isPointOnDesktopWindow(QVariant 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
|
||||
/// might be in same thread as a script that sets the reticle to invisible
|
||||
void WindowScriptingInterface::ensureReticleVisible() const {
|
||||
|
@ -391,11 +387,19 @@ QString WindowScriptingInterface::checkVersion() {
|
|||
}
|
||||
|
||||
int WindowScriptingInterface::getInnerWidth() {
|
||||
return qApp->getWindow()->geometry().width();
|
||||
return qApp->getDeviceSize().x;
|
||||
}
|
||||
|
||||
int WindowScriptingInterface::getInnerHeight() {
|
||||
return qApp->getWindow()->geometry().height();
|
||||
return qApp->getDeviceSize().y;
|
||||
}
|
||||
|
||||
int WindowScriptingInterface::getMenuHeight() {
|
||||
return qApp->getPrimaryMenu()->geometry().height();
|
||||
}
|
||||
|
||||
glm::vec2 WindowScriptingInterface::getDeviceSize() const {
|
||||
return qApp->getDeviceSize();
|
||||
}
|
||||
|
||||
int WindowScriptingInterface::getX() {
|
||||
|
|
|
@ -39,11 +39,14 @@ class WindowScriptingInterface : public QObject, public Dependency {
|
|||
Q_PROPERTY(int innerHeight READ getInnerHeight)
|
||||
Q_PROPERTY(int x READ getX)
|
||||
Q_PROPERTY(int y READ getY)
|
||||
Q_PROPERTY(int menuHeight READ getMenuHeight)
|
||||
|
||||
public:
|
||||
WindowScriptingInterface();
|
||||
~WindowScriptingInterface();
|
||||
int getInnerWidth();
|
||||
int getInnerHeight();
|
||||
int getMenuHeight();
|
||||
int getX();
|
||||
int getY();
|
||||
|
||||
|
|
Loading…
Reference in a new issue