mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
Use the "User Interface Colour" defined in the general settings as the background color of the
various dial widgets and PFD, make the GCS look and feel more coherent. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1130 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
e5c19a38c5
commit
3335be3fd9
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "dialgadgetwidget.h"
|
||||
#include <utils/stylehelper.h>
|
||||
#include <iostream>
|
||||
#include <QDebug>
|
||||
|
||||
@ -164,6 +165,7 @@ void DialGadgetWidget::setDialFile(QString dfn, QString bg, QString fg, QString
|
||||
n2enabled = false;
|
||||
n3enabled = false;
|
||||
QGraphicsScene *l_scene = scene();
|
||||
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
|
||||
if (QFile::exists(dfn) && m_renderer->load(dfn) && m_renderer->isValid())
|
||||
{
|
||||
l_scene->clear(); // This also deletes all items contained in the scene.
|
||||
|
@ -26,8 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "lineardialgadgetwidget.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <utils/stylehelper.h>
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QDebug>
|
||||
|
||||
@ -135,6 +134,7 @@ void LineardialGadgetWidget::updateIndex(UAVObject *object1) {
|
||||
void LineardialGadgetWidget::setDialFile(QString dfn)
|
||||
{
|
||||
QGraphicsScene *l_scene = scene();
|
||||
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
|
||||
if (QFile::exists(dfn) && m_renderer->load(dfn) && m_renderer->isValid() )
|
||||
{
|
||||
l_scene->clear(); // Beware: clear also deletes all objects
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "pfdgadgetwidget.h"
|
||||
#include <utils/stylehelper.h>
|
||||
#include <iostream>
|
||||
#include <QDebug>
|
||||
#include <cmath>
|
||||
@ -280,6 +281,7 @@ void PFDGadgetWidget::updateBattery(UAVObject *object1) {
|
||||
void PFDGadgetWidget::setDialFile(QString dfn)
|
||||
{
|
||||
QGraphicsScene *l_scene = scene();
|
||||
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
|
||||
if (QFile::exists(dfn) && m_renderer->load(dfn) && m_renderer->isValid())
|
||||
{
|
||||
/* The PFD element IDs are fixed, not like with the analog dial.
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "systemhealthgadgetwidget.h"
|
||||
#include "utils/stylehelper.h"
|
||||
#include "extensionsystem/pluginmanager.h"
|
||||
#include "uavobjects/uavobjectmanager.h"
|
||||
#include "uavobjects/systemalarms.h"
|
||||
@ -42,6 +43,7 @@ SystemHealthGadgetWidget::SystemHealthGadgetWidget(QWidget *parent) : QGraphicsV
|
||||
setMinimumSize(128,128);
|
||||
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
setScene(new QGraphicsScene(this));
|
||||
|
||||
|
||||
m_renderer = new QSvgRenderer();
|
||||
background = new QGraphicsSvgItem();
|
||||
@ -106,6 +108,7 @@ SystemHealthGadgetWidget::~SystemHealthGadgetWidget()
|
||||
|
||||
void SystemHealthGadgetWidget::setSystemFile(QString dfn)
|
||||
{
|
||||
setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
|
||||
if (QFile::exists(dfn))
|
||||
{
|
||||
m_renderer->load(dfn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user