Update RunningScripts height to take menu bar into account

This commit is contained in:
Ryan Huffman 2014-09-02 14:13:42 -07:00
parent e6def6e35b
commit 55acff02a1

View file

@ -156,9 +156,11 @@ void RunningScriptsWidget::showEvent(QShowEvent* event) {
const QRect parentGeometry = parentWidget()->geometry();
int titleBarHeight = UIUtil::getWindowTitleBarHeight(this);
int menuBarHeight = Menu::getInstance()->geometry().height();
int topMargin = titleBarHeight + menuBarHeight;
setGeometry(parentGeometry.topLeft().x(), parentGeometry.topLeft().y() + titleBarHeight,
size().width(), parentWidget()->height() - titleBarHeight);
setGeometry(parentGeometry.topLeft().x(), parentGeometry.topLeft().y() + topMargin,
size().width(), parentWidget()->height() - topMargin);
QWidget::showEvent(event);
}