History

Merge pull request #12102 from cain-kilgore/21664

WL 21664 - Window.innerHeight should not include the menu bar

MiladNazeri committed 8 years ago

Commit 30173152 parents 19106fc b26e31a2 files · +8 −7Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+6−6
@@ -182,10 +182,6 @@ bool WindowScriptingInterface::isPointOnDesktopWindow(QVariant point) { · 181 unmodified lines
182 return offscreenUi->isPointOnDesktopWindow(point);182 return offscreenUi->isPointOnDesktopWindow(point);
183}183}
184 184
185glm::vec2 WindowScriptingInterface::getDeviceSize() const {
186 return qApp->getDeviceSize();
187}
188
189/// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and185/// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and
190/// might be in same thread as a script that sets the reticle to invisible186/// might be in same thread as a script that sets the reticle to invisible
191void WindowScriptingInterface::ensureReticleVisible() const {187void WindowScriptingInterface::ensureReticleVisible() const {
@@ -395,11 +391,15 @@ QString WindowScriptingInterface::checkVersion() { · 203 unmodified lines
395}391}
396 392
397int WindowScriptingInterface::getInnerWidth() {393int WindowScriptingInterface::getInnerWidth() {
398 return qApp->getWindow()->geometry().width();394 return qApp->getDeviceSize().x;
399}395}
400 396
401int WindowScriptingInterface::getInnerHeight() {397int WindowScriptingInterface::getInnerHeight() {
402 return qApp->getWindow()->geometry().height();398 return qApp->getDeviceSize().y;
399}
400
401glm::vec2 WindowScriptingInterface::getDeviceSize() const {
402 return qApp->getDeviceSize();
403}403}
404 404
405int WindowScriptingInterface::getX() {405int WindowScriptingInterface::getX() {