Commit b0cb4bce authored by Bryant Mairs's avatar Bryant Mairs

The Primary Flight Display widget is now properly resizable.

parent 389464bc
...@@ -677,10 +677,10 @@ void MainWindow::buildCommonWidgets() ...@@ -677,10 +677,10 @@ void MainWindow::buildCommonWidgets()
menuActionHelper->createToolAction(tr("Actuator Status"), "HEAD_DOWN_DISPLAY_2_DOCKWIDGET"); menuActionHelper->createToolAction(tr("Actuator Status"), "HEAD_DOWN_DISPLAY_2_DOCKWIDGET");
menuActionHelper->createToolAction(tr("Radio Control")); menuActionHelper->createToolAction(tr("Radio Control"));
createDockWidget(engineeringView,new HUD(320,240,this),tr("Video Downlink"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_ENGINEER,Qt::RightDockWidgetArea,QSize(this->width()/1.5,0)); createDockWidget(engineeringView,new HUD(320,240,this),tr("Video Downlink"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_ENGINEER,Qt::RightDockWidgetArea);
createDockWidget(simView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea,QSize(this->width()/1.5,0)); createDockWidget(simView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea);
createDockWidget(pilotView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea,QSize(this->width()/1.8,0)); createDockWidget(pilotView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this); QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this);
infoview->addSource(mavlinkDecoder); infoview->addSource(mavlinkDecoder);
......
...@@ -170,12 +170,12 @@ PrimaryFlightDisplay::~PrimaryFlightDisplay() ...@@ -170,12 +170,12 @@ PrimaryFlightDisplay::~PrimaryFlightDisplay()
refreshTimer->stop(); refreshTimer->stop();
} }
QSize PrimaryFlightDisplay::sizeHint() const QSize PrimaryFlightDisplay::sizeHint() const
{ {
return QSize(width(), (width()*3.0f)/4); return QSize(width(), (int)(width() * 3.0f / 4.0f));
} }
void PrimaryFlightDisplay::showEvent(QShowEvent* event) void PrimaryFlightDisplay::showEvent(QShowEvent* event)
{ {
// React only to internal (pre-display) // React only to internal (pre-display)
......
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