1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1568 Fixes transparent background issue that causes black tooltip - Telemetry monitor a little bigger

This commit is contained in:
Laurent Lalanne 2014-10-24 15:10:52 +02:00
parent 3e9530f419
commit a0270cca15
2 changed files with 4 additions and 10 deletions

View File

@ -98,7 +98,7 @@ QGraphicsTextItem *createTextItem(QGraphicsSvgItem *parent, QString elementId, Q
MonitorWidget::MonitorWidget(QWidget *parent) :
QGraphicsView(parent), aspectRatioMode(Qt::KeepAspectRatio)
{
setMinimumSize(180, 25);
setMinimumSize(195, 25);
QGraphicsScene *scene = new QGraphicsScene();
@ -110,6 +110,8 @@ MonitorWidget::MonitorWidget(QWidget *parent) :
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setStyleSheet("QGraphicsView{background:transparent;}");
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);

View File

@ -68,20 +68,12 @@ bool TelemetryPlugin::initialize(const QStringList & args, QString *errMsg)
// TODO not so good... g is probalby leaked...
MonitorWidget *w = mf->createMonitorWidget(NULL);
w->setMaximumWidth(180);
//
// setAlignment(Qt::AlignCenter);
w->setMaximumWidth(195);
// no border
w->setFrameStyle(QFrame::NoFrame);
w->setWindowFlags(Qt::FramelessWindowHint);
// set svg background translucent
w->setStyleSheet("background:transparent;");
// set widget background translucent
w->setAttribute(Qt::WA_TranslucentBackground);
w->setBackgroundBrush(Qt::NoBrush);
// add monitor widget to connection manager