diff --git a/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.cpp b/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.cpp index 8de9e66e0..e83891d06 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.cpp @@ -50,8 +50,7 @@ ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow) : { // device list m_availableDevList = new QComboBox; - m_availableDevList->setMinimumWidth(120); - m_availableDevList->setMaximumWidth(180); + m_availableDevList->setMinimumContentsLength(tr("USB: OPLinkMini").length()); m_availableDevList->setContextMenuPolicy(Qt::CustomContextMenu); // connect button @@ -60,9 +59,9 @@ ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow) : // put everything together QHBoxLayout *layout = new QHBoxLayout; - layout->setSpacing(5); + layout->setSpacing(6); // cheat a bit with the margin to "nicely" center things vertically - layout->setContentsMargins(5, 0, 5, 4); + layout->setContentsMargins(6, 0, 4, 2); setLayout(layout); layout->addWidget(new QLabel(tr("Connections:")), 0, Qt::AlignVCenter); diff --git a/ground/openpilotgcs/src/plugins/telemetry/monitorwidget.cpp b/ground/openpilotgcs/src/plugins/telemetry/monitorwidget.cpp index 722869652..b3ece0e10 100644 --- a/ground/openpilotgcs/src/plugins/telemetry/monitorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/telemetry/monitorwidget.cpp @@ -98,13 +98,13 @@ QGraphicsTextItem *createTextItem(QGraphicsSvgItem *parent, QString elementId, Q MonitorWidget::MonitorWidget(QWidget *parent) : QGraphicsView(parent), aspectRatioMode(Qt::KeepAspectRatio) { - // setMinimumWidth(180); + setMinimumSize(180, 25); QGraphicsScene *scene = new QGraphicsScene(); setScene(scene); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); // no scroll bars setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);