From da650cee607b194b6057d9f42498f82ba4813ca6 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 24 Jan 2012 11:31:00 +0200 Subject: [PATCH 1/2] gcscontrol: keep joystick image aspect ratio OP-619 --- ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp index 0596b22c1..571b07068 100644 --- a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp +++ b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp @@ -149,7 +149,7 @@ void JoystickControl::paintEvent(QPaintEvent *event) void JoystickControl::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); - fitInView(m_background, Qt::IgnoreAspectRatio ); + fitInView(m_background, Qt::KeepAspectRatio); } /** From 242bfe6c69413996089cb6721f1fdd5c3f12848d Mon Sep 17 00:00:00 2001 From: zedamota Date: Tue, 24 Jan 2012 22:29:08 +0000 Subject: [PATCH 2/2] added new Transmitter artwork to the input wizard. --- .../src/plugins/config/configgadget.qrc | 1 + .../src/plugins/config/configinputwidget.cpp | 6 +- .../src/plugins/config/images/TX2.svg | 2852 +++++++++++++++++ 3 files changed, 2856 insertions(+), 3 deletions(-) create mode 100644 ground/openpilotgcs/src/plugins/config/images/TX2.svg diff --git a/ground/openpilotgcs/src/plugins/config/configgadget.qrc b/ground/openpilotgcs/src/plugins/config/configgadget.qrc index f24cb68b8..6eb11f079 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadget.qrc +++ b/ground/openpilotgcs/src/plugins/config/configgadget.qrc @@ -17,5 +17,6 @@ images/gyroscope.png images/TX.svg images/camera.png + images/TX2.svg diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index 863104447..2f3b83754 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -41,8 +41,8 @@ #include #include -#define ACCESS_MIN_MOVE -6 -#define ACCESS_MAX_MOVE 6 +#define ACCESS_MIN_MOVE -3 +#define ACCESS_MAX_MOVE 3 #define STICK_MIN_MOVE -8 #define STICK_MAX_MOVE 8 @@ -108,7 +108,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent) m_renderer = new QSvgRenderer(); QGraphicsScene *l_scene = m_config->graphicsView->scene(); m_config->graphicsView->setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor())); - if (QFile::exists(":/configgadget/images/TX.svg") && m_renderer->load(QString(":/configgadget/images/TX.svg")) && m_renderer->isValid()) + if (QFile::exists(":/configgadget/images/TX2.svg") && m_renderer->load(QString(":/configgadget/images/TX2.svg")) && m_renderer->isValid()) { l_scene->clear(); // Deletes all items contained in the scene as well. diff --git a/ground/openpilotgcs/src/plugins/config/images/TX2.svg b/ground/openpilotgcs/src/plugins/config/images/TX2.svg new file mode 100644 index 000000000..a6c8a533a --- /dev/null +++ b/ground/openpilotgcs/src/plugins/config/images/TX2.svg @@ -0,0 +1,2852 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file