From 1e4262b3097c63a98734f99982b0f2811695cd94 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 27 May 2013 19:55:25 +0200 Subject: [PATCH] OP-926 Fix huge tab height on kde due to wrong telemetrymonitorwidget size. Patch from Noxs, more details here: http://git.openpilot.org/cru/OPReview-486 +review OPReview-486 --- .../src/plugins/coreplugin/telemetrymonitorwidget.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/telemetrymonitorwidget.cpp b/ground/openpilotgcs/src/plugins/coreplugin/telemetrymonitorwidget.cpp index 268c7f1d4..0463d68d2 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/telemetrymonitorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/telemetrymonitorwidget.cpp @@ -7,8 +7,8 @@ TelemetryMonitorWidget::TelemetryMonitorWidget(QWidget *parent) : QGraphicsView(parent) { - setMinimumSize(180, 100); - setMaximumSize(180, 100); + setMinimumSize(180, 25); // From 100->25 to shorten the qwidget. + setMaximumSize(180, 25); // as above. setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -18,7 +18,7 @@ TelemetryMonitorWidget::TelemetryMonitorWidget(QWidget *parent) : QGraphicsView( setAttribute(Qt::WA_TranslucentBackground); setWindowFlags(Qt::FramelessWindowHint); - QGraphicsScene *scene = new QGraphicsScene(0, 0, 180, 100, this); + QGraphicsScene *scene = new QGraphicsScene(0, 0, 180, 25, this); // keeping the scene in line with the widget for testing. QSvgRenderer *renderer = new QSvgRenderer(); if (renderer->load(QString(":/core/images/tx-rx.svg"))) { @@ -172,6 +172,5 @@ void TelemetryMonitorWidget::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); - graph->setPos(0, -130); fitInView(graph, Qt::KeepAspectRatio); }