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
182182 return offscreenUi->isPointOnDesktopWindow(point);
183183 }
184184
185−glm::vec2 WindowScriptingInterface::getDeviceSize() const {
186− return qApp->getDeviceSize();
187−}
188−
189185 /// Makes sure that the reticle is visible, use this in blocking forms that require a reticle and
190186 /// might be in same thread as a script that sets the reticle to invisible
191187 void WindowScriptingInterface::ensureReticleVisible() const {
@@ -395,11 +391,15 @@ QString WindowScriptingInterface::checkVersion() { · 203 unmodified lines
395391 }
396392
397393 int WindowScriptingInterface::getInnerWidth() {
398− return qApp->getWindow()->geometry().width();
394+ return qApp->getDeviceSize().x;
399395 }
400396
401397 int WindowScriptingInterface::getInnerHeight() {
402− return qApp->getWindow()->geometry().height();
398+ return qApp->getDeviceSize().y;
399+}
400+
401+glm::vec2 WindowScriptingInterface::getDeviceSize() const {
402+ return qApp->getDeviceSize();
403403 }
404404
405405 int WindowScriptingInterface::getX() {