1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

PopupWidget: Start the dialog at twice the size of the embedded widget.

This commit is contained in:
Mike LaBranche 2012-07-30 15:02:18 -07:00
parent 6adafbc4bf
commit 5398d96839

View File

@ -37,9 +37,12 @@ void PopupWidget::setWidget(QWidget* widget)
m_widget = widget;
m_widgetParent = widget->parentWidget();
// save the current width,height so we can restore when closed
m_widgetWidth = m_widget->width();
m_widgetHeight = m_widget->height();
// double the size of the widget for the dialog
m_widget->resize(m_widgetWidth * 2, m_widgetHeight * 2);
m_layout->addWidget(m_widget);
}