From c00032ef1618ea4a09747045d26a6b31f7eed172 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 30 Apr 2013 17:48:14 +0200 Subject: [PATCH] Lots of usability improvements --- .../images/actions/qgroundcontrol-connect.svg | 284 ++++++++++++++++++ files/styles/style-indoor.css | 7 +- qgroundcontrol.qrc | 1 + src/configuration.h | 4 +- src/ui/CommConfigurationWindow.cc | 12 + src/ui/CommSettings.ui | 18 +- src/ui/QGCToolBar.cc | 2 +- src/ui/WaypointEditableView.ui | 31 +- src/ui/map/QGCMapTool.ui | 4 +- src/ui/map/QGCMapToolBar.ui | 17 +- src/ui/map/QGCMapWidget.cc | 4 +- src/ui/uas/QGCUnconnectedInfoWidget.cc | 2 +- src/ui/uas/QGCUnconnectedInfoWidget.ui | 53 +++- 13 files changed, 390 insertions(+), 49 deletions(-) create mode 100644 files/images/actions/qgroundcontrol-connect.svg diff --git a/files/images/actions/qgroundcontrol-connect.svg b/files/images/actions/qgroundcontrol-connect.svg new file mode 100644 index 000000000..2afbaee95 --- /dev/null +++ b/files/images/actions/qgroundcontrol-connect.svg @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + Connect Link + + + + + diff --git a/files/styles/style-indoor.css b/files/styles/style-indoor.css index 5989e6c88..f7ae95be6 100644 --- a/files/styles/style-indoor.css +++ b/files/styles/style-indoor.css @@ -113,8 +113,7 @@ QDockWidget::close-button:pressed, QDockWidget::float-button:pressed { QDockWidget { border: 10px solid #66666B; - padding: 2px; - margin: 1px; + /*padding: 2px;*/ border-radius: 1px; /*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52);*/ /* titlebar-close-icon: url(close.png); @@ -269,9 +268,9 @@ QSlider::groove:horizontal { } QSlider::groove:disabled:horizontal { - border: 1px solid #AAAAAA; + border: 1px solid #454545; height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #6A6A6F, stop:1 #6A6A6F); + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4A4A4F, stop:1 #4A4A4F); margin: 2px 0; } diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 0eab6e9a1..4b47ee099 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -101,6 +101,7 @@ files/styles/style-outdoor.css files/images/patterns/lenna.jpg files/images/rc_stick.svg + files/images/actions/qgroundcontrol-connect.svg files/styles/Vera.ttf diff --git a/src/configuration.h b/src/configuration.h index 95fc283a6..759c97523 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -12,14 +12,14 @@ #define WITH_TEXT_TO_SPEECH 1 #define QGC_APPLICATION_NAME "QGroundControl" -#define QGC_APPLICATION_VERSION "v. 1.0.5 (beta)" +#define QGC_APPLICATION_VERSION "v. 1.0.6 (beta)" namespace QGC { const QString APPNAME = "QGROUNDCONTROL"; const QString COMPANYNAME = "QGROUNDCONTROL"; -const int APPLICATIONVERSION = 105; // 1.0.4 +const int APPLICATIONVERSION = 106; // 1.0.6 } #endif // QGC_CONFIGURATION_H diff --git a/src/ui/CommConfigurationWindow.cc b/src/ui/CommConfigurationWindow.cc index 365417587..43a3698a1 100644 --- a/src/ui/CommConfigurationWindow.cc +++ b/src/ui/CommConfigurationWindow.cc @@ -62,6 +62,18 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn // Setup the user interface according to link type ui.setupUi(this); + // Initialize basic ui state + + // Do not allow changes here unless advanced is checked + ui.connectionType->setEnabled(false); + ui.linkType->setEnabled(false); + ui.protocolGroupBox->setVisible(false); + + // Connect UI element visibility to checkbox + connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.connectionType, SLOT(setEnabled(bool))); + connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.linkType, SLOT(setEnabled(bool))); + connect(ui.advancedOptionsCheckBox, SIGNAL(clicked(bool)), ui.protocolGroupBox, SLOT(setVisible(bool))); + // add link types ui.linkType->addItem(tr("Serial"), QGC_LINK_SERIAL); ui.linkType->addItem(tr("UDP"), QGC_LINK_UDP); diff --git a/src/ui/CommSettings.ui b/src/ui/CommSettings.ui index 3eeaea703..91f0ad49d 100644 --- a/src/ui/CommSettings.ui +++ b/src/ui/CommSettings.ui @@ -7,7 +7,7 @@ 0 0 413 - 484 + 373 @@ -17,9 +17,6 @@ 6 - - 6 - @@ -62,6 +59,13 @@ + + + + Advanced Options + + + @@ -94,7 +98,7 @@ 0 0 393 - 154 + 76 @@ -126,7 +130,7 @@ 0 0 393 - 154 + 76 @@ -169,7 +173,7 @@ - Delete + Delete Link diff --git a/src/ui/QGCToolBar.cc b/src/ui/QGCToolBar.cc index eb8b351cd..37932647e 100644 --- a/src/ui/QGCToolBar.cc +++ b/src/ui/QGCToolBar.cc @@ -147,7 +147,7 @@ void QGCToolBar::createUI() QWidget* spacer = new QWidget(); spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - spacer->setStyleSheet("* { margin: 0px; background-color: transparent; min-height: 28px}"); + spacer->setStyleSheet("* { margin: 0px; background-color: transparent; min-height: 24px}"); addWidget(spacer); connectButton = new QPushButton(tr("Connect"), this); diff --git a/src/ui/WaypointEditableView.ui b/src/ui/WaypointEditableView.ui index c77317ccf..9ea57c58e 100644 --- a/src/ui/WaypointEditableView.ui +++ b/src/ui/WaypointEditableView.ui @@ -43,7 +43,6 @@ QGroupBox { border: 1px solid #EEEEEE; border-radius: 5px; padding: 0px 0px 0px 0px; -margin-top: 1ex; /* leave space at the top for the title */ margin: 0px; } @@ -55,26 +54,22 @@ margin-top: 1ex; /* leave space at the top for the title */ font: bold 8px; } - QDockWidget { - font: bold; - border: 1px solid #32345E; -} - QPushButton { font-weight: bold; font-size: 12px; - border: 1px solid #999999; - border-radius: 10px; - min-width:22px; - max-width: 36px; + border: 1px solid #465158; + margin: 1px; + border-radius: 2px; + min-width:16px; + max-width: 16px; min-height: 16px; max-height: 16px; padding: 2px; - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #777777, stop: 1 #555555); + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52); } QPushButton:pressed { - background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #444444, stop: 1 #555555); + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09A2B2, stop: 1 #414B52); } @@ -270,8 +265,8 @@ QPushButton:pressed { - 28 - 22 + 24 + 24 @@ -302,8 +297,8 @@ QPushButton:pressed { - 28 - 22 + 24 + 24 @@ -334,8 +329,8 @@ QPushButton:pressed { - 28 - 22 + 24 + 24 diff --git a/src/ui/map/QGCMapTool.ui b/src/ui/map/QGCMapTool.ui index 0bc87d300..b8efd016a 100644 --- a/src/ui/map/QGCMapTool.ui +++ b/src/ui/map/QGCMapTool.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 300 + 261 + 206 diff --git a/src/ui/map/QGCMapToolBar.ui b/src/ui/map/QGCMapToolBar.ui index 54da52b38..91840d452 100644 --- a/src/ui/map/QGCMapToolBar.ui +++ b/src/ui/map/QGCMapToolBar.ui @@ -13,7 +13,7 @@ Form - + 2 @@ -58,7 +58,7 @@ - Clear Trails + Clear Map @@ -69,6 +69,19 @@ + + + + Qt::Horizontal + + + + 20 + 20 + + + + diff --git a/src/ui/map/QGCMapWidget.cc b/src/ui/map/QGCMapWidget.cc index b7c0de399..5645b2d73 100644 --- a/src/ui/map/QGCMapWidget.cc +++ b/src/ui/map/QGCMapWidget.cc @@ -55,8 +55,8 @@ void QGCMapWidget::showEvent(QShowEvent* event) SetFollowMouse(true); // we want a contiuous mouse position reading SetShowHome(true); // display the HOME position on the map - Home->SetSafeArea(30); // set radius (meters) - Home->SetShowSafeArea(true); // show the safe area + Home->SetSafeArea(0); // set radius (meters) + Home->SetShowSafeArea(false); // show the safe area Home->SetCoord(pos_lat_lon); // set the HOME position setFrameStyle(QFrame::NoFrame); // no border frame diff --git a/src/ui/uas/QGCUnconnectedInfoWidget.cc b/src/ui/uas/QGCUnconnectedInfoWidget.cc index f0bec6267..ab81a04a1 100644 --- a/src/ui/uas/QGCUnconnectedInfoWidget.cc +++ b/src/ui/uas/QGCUnconnectedInfoWidget.cc @@ -15,7 +15,7 @@ QGCUnconnectedInfoWidget::QGCUnconnectedInfoWidget(QWidget *parent) : connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(addLink())); // Overwrite global style sheet - ui->connectButton->setStyleSheet("* { max-height: 1000; background-color: transparent; border-color: transparent; }"); + //ui->connectButton->setStyleSheet("* { max-height: 1000; background-color: transparent; border-color: transparent; }"); //ui->connectButton->setStyleSheet("QToolButton {background-color: green; border-radius: 20px; } QButton {} QPushButton {}"); } diff --git a/src/ui/uas/QGCUnconnectedInfoWidget.ui b/src/ui/uas/QGCUnconnectedInfoWidget.ui index 5999885e3..6a1ac83bd 100644 --- a/src/ui/uas/QGCUnconnectedInfoWidget.ui +++ b/src/ui/uas/QGCUnconnectedInfoWidget.ui @@ -7,39 +7,72 @@ 0 0 372 - 299 + 309 Form - + - 0 - 0 + 150 + 150 + + + + + 20 + 20 + + + + + 150 + 150 - + +QToolButton { +color: #222222; +background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #80B81D, stop: 1 #306807); +margin: 15px; +padding: 20px; +border-radius: 18px; +min-height: 100px; +border: 2px solid #085B35; +} + +QToolButton:pressed { +background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #306807, stop: 1 #80B81D); +color: #222222; +border-color: #D1892A; +} + +QToolButton:checked { +background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #306807, stop: 1 #80B81D); +color: #222222; +border-color: #D1892A; +} - Click Icon to Connect + - :/files/images/devices/network-wireless.svg:/files/images/devices/network-wireless.svg + :/files/images/actions/qgroundcontrol-connect.svg:/files/images/actions/qgroundcontrol-connect.svg - 180 - 200 + 140 + 140 - Qt::ToolButtonTextUnderIcon + Qt::ToolButtonIconOnly -- 2.22.0