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 | return offscreenUi->isPointOnDesktopWindow(point); | 176 | return offscreenUi->isPointOnDesktopWindow(point); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | glm::vec2 WindowScriptingInterface::getDeviceSize() const { | ||
| 180 | return qApp->getDeviceSize(); | ||
| 181 | } | ||
| 182 | |||
| 183 | /// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and | 179 | /// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and |
| 184 | /// might be in same thread as a script that sets the reticle to invisible | 180 | /// might be in same thread as a script that sets the reticle to invisible |
| 185 | void WindowScriptingInterface::ensureReticleVisible() const { | 181 | void WindowScriptingInterface::ensureReticleVisible() const { |
| @@ -391,11 +387,19 @@ QString WindowScriptingInterface::checkVersion() { · 205 unmodified lines | |||
| 391 | } | 387 | } |
| 392 | 388 | ||
| 393 | int WindowScriptingInterface::getInnerWidth() { | 389 | int WindowScriptingInterface::getInnerWidth() { |
| 394 | return qApp->getWindow()->geometry().width(); | 390 | return qApp->getDeviceSize().x; |
| 395 | } | 391 | } |
| 396 | 392 | ||
| 397 | int WindowScriptingInterface::getInnerHeight() { | 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 | int WindowScriptingInterface::getX() { | 405 | int WindowScriptingInterface::getX() { |