Commit 4b9bf09e authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Move DocumentWarningWidgetwarning to the center



Change-Id: Ieb3873cc4951391b4048d573a6817644c055cee6
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent afc498e2
...@@ -498,8 +498,10 @@ ViewManager &DesignModeWidget::viewManager() ...@@ -498,8 +498,10 @@ ViewManager &DesignModeWidget::viewManager()
void DesignModeWidget::resizeEvent(QResizeEvent *event) void DesignModeWidget::resizeEvent(QResizeEvent *event)
{ {
if (m_warningWidget) if (m_warningWidget) {
m_warningWidget->move(QPoint(event->size().width() / 2, event->size().height() / 2)); QPoint warningWidgetCenterPoint = m_warningWidget->rect().center();
m_warningWidget->move(QPoint(event->size().width() / 2, event->size().height() / 2) - warningWidgetCenterPoint);
}
QWidget::resizeEvent(event); QWidget::resizeEvent(event);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment