Instead of returning the main window dimension (modulo the height of the menu bar) let s return the size of the actual 3d viewport widget

This commit is contained in:
Sam Gateau 2019-05-15 17:57:53 -07:00
parent ee9d3d3ae1
commit edbd354760

View file

@ -414,11 +414,11 @@ QString WindowScriptingInterface::protocolSignature() {
}
int WindowScriptingInterface::getInnerWidth() {
return qApp->getWindow()->geometry().width();
return qApp->getPrimaryWidget()->geometry().width();
}
int WindowScriptingInterface::getInnerHeight() {
return qApp->getWindow()->geometry().height() - qApp->getPrimaryMenu()->geometry().height();
return qApp->getPrimaryWidget()->geometry().height();
}
glm::vec2 WindowScriptingInterface::getDeviceSize() const {