Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -176,10 +176,6 @@ bool WindowScriptingInterface::isPointOnDesktopWindow(QVariant point) { · 175 unmodified lines | ||
| 176 | 176 | return offscreenUi->isPointOnDesktopWindow(point); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | −glm::vec2 WindowScriptingInterface::getDeviceSize() const { | |
| 180 | − return qApp->getDeviceSize(); | |
| 181 | −} | |
| 182 | − | |
| 183 | 179 | /// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and |
| 184 | 180 | /// might be in same thread as a script that sets the reticle to invisible |
| 185 | 181 | void WindowScriptingInterface::ensureReticleVisible() const { |
| @@ -391,11 +387,19 @@ QString WindowScriptingInterface::checkVersion() { · 205 unmodified lines | ||
| 391 | 387 | } |
| 392 | 388 | |
| 393 | 389 | int WindowScriptingInterface::getInnerWidth() { |
| 394 | − return qApp->getWindow()->geometry().width(); | |
| 390 | + return qApp->getDeviceSize().x; | |
| 395 | 391 | } |
| 396 | 392 | |
| 397 | 393 | int WindowScriptingInterface::getInnerHeight() { |
| 398 | − return qApp->getWindow()->geometry().height(); | |
| 394 | + return qApp->getDeviceSize().y; | |
| 395 | +} | |
| 396 | + | |
| 397 | +int WindowScriptingInterface::getMenuHeight() { | |
| 398 | + return qApp->getPrimaryMenu()->geometry().height(); | |
| 399 | +} | |
| 400 | + | |
| 401 | +glm::vec2 WindowScriptingInterface::getDeviceSize() const { | |
| 402 | + return qApp->getDeviceSize(); | |
| 399 | 403 | } |
| 400 | 404 | |
| 401 | 405 | int WindowScriptingInterface::getX() { |