Commit c00032ef authored by Lorenz Meier's avatar Lorenz Meier

Lots of usability improvements

parent 9fb46a10
This diff is collapsed.
...@@ -113,8 +113,7 @@ QDockWidget::close-button:pressed, QDockWidget::float-button:pressed { ...@@ -113,8 +113,7 @@ QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
QDockWidget { QDockWidget {
border: 10px solid #66666B; border: 10px solid #66666B;
padding: 2px; /*padding: 2px;*/
margin: 1px;
border-radius: 1px; border-radius: 1px;
/*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52);*/ /*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52);*/
/* titlebar-close-icon: url(close.png); /* titlebar-close-icon: url(close.png);
...@@ -269,9 +268,9 @@ QSlider::groove:horizontal { ...@@ -269,9 +268,9 @@ QSlider::groove:horizontal {
} }
QSlider::groove:disabled: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 */ 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; margin: 2px 0;
} }
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<file>files/styles/style-outdoor.css</file> <file>files/styles/style-outdoor.css</file>
<file>files/images/patterns/lenna.jpg</file> <file>files/images/patterns/lenna.jpg</file>
<file>files/images/rc_stick.svg</file> <file>files/images/rc_stick.svg</file>
<file>files/images/actions/qgroundcontrol-connect.svg</file>
</qresource> </qresource>
<qresource prefix="/general"> <qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file> <file alias="vera.ttf">files/styles/Vera.ttf</file>
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
#define WITH_TEXT_TO_SPEECH 1 #define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl" #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 namespace QGC
{ {
const QString APPNAME = "QGROUNDCONTROL"; const QString APPNAME = "QGROUNDCONTROL";
const QString COMPANYNAME = "QGROUNDCONTROL"; const QString COMPANYNAME = "QGROUNDCONTROL";
const int APPLICATIONVERSION = 105; // 1.0.4 const int APPLICATIONVERSION = 106; // 1.0.6
} }
#endif // QGC_CONFIGURATION_H #endif // QGC_CONFIGURATION_H
...@@ -62,6 +62,18 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn ...@@ -62,6 +62,18 @@ CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolIn
// Setup the user interface according to link type // Setup the user interface according to link type
ui.setupUi(this); 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 // add link types
ui.linkType->addItem(tr("Serial"), QGC_LINK_SERIAL); ui.linkType->addItem(tr("Serial"), QGC_LINK_SERIAL);
ui.linkType->addItem(tr("UDP"), QGC_LINK_UDP); ui.linkType->addItem(tr("UDP"), QGC_LINK_UDP);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>413</width> <width>413</width>
<height>484</height> <height>373</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
<property name="margin"> <property name="margin">
<number>6</number> <number>6</number>
</property> </property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
...@@ -62,6 +59,13 @@ ...@@ -62,6 +59,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<widget class="QCheckBox" name="advancedOptionsCheckBox">
<property name="text">
<string>Advanced Options</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
...@@ -94,7 +98,7 @@ ...@@ -94,7 +98,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>393</width> <width>393</width>
<height>154</height> <height>76</height>
</rect> </rect>
</property> </property>
</widget> </widget>
...@@ -126,7 +130,7 @@ ...@@ -126,7 +130,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>393</width> <width>393</width>
<height>154</height> <height>76</height>
</rect> </rect>
</property> </property>
</widget> </widget>
...@@ -169,7 +173,7 @@ ...@@ -169,7 +173,7 @@
<item> <item>
<widget class="QPushButton" name="deleteButton"> <widget class="QPushButton" name="deleteButton">
<property name="text"> <property name="text">
<string>Delete</string> <string>Delete Link</string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -147,7 +147,7 @@ void QGCToolBar::createUI() ...@@ -147,7 +147,7 @@ void QGCToolBar::createUI()
QWidget* spacer = new QWidget(); QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 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); addWidget(spacer);
connectButton = new QPushButton(tr("Connect"), this); connectButton = new QPushButton(tr("Connect"), this);
......
...@@ -43,7 +43,6 @@ QGroupBox { ...@@ -43,7 +43,6 @@ QGroupBox {
border: 1px solid #EEEEEE; border: 1px solid #EEEEEE;
border-radius: 5px; border-radius: 5px;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
margin-top: 1ex; /* leave space at the top for the title */
margin: 0px; margin: 0px;
} }
...@@ -55,26 +54,22 @@ margin-top: 1ex; /* leave space at the top for the title */ ...@@ -55,26 +54,22 @@ margin-top: 1ex; /* leave space at the top for the title */
font: bold 8px; font: bold 8px;
} }
QDockWidget {
font: bold;
border: 1px solid #32345E;
}
QPushButton { QPushButton {
font-weight: bold; font-weight: bold;
font-size: 12px; font-size: 12px;
border: 1px solid #999999; border: 1px solid #465158;
border-radius: 10px; margin: 1px;
min-width:22px; border-radius: 2px;
max-width: 36px; min-width:16px;
max-width: 16px;
min-height: 16px; min-height: 16px;
max-height: 16px; max-height: 16px;
padding: 2px; 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 { 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);
} }
</string> </string>
</property> </property>
...@@ -270,8 +265,8 @@ QPushButton:pressed { ...@@ -270,8 +265,8 @@ QPushButton:pressed {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>28</width> <width>24</width>
<height>22</height> <height>24</height>
</size> </size>
</property> </property>
<property name="focusPolicy"> <property name="focusPolicy">
...@@ -302,8 +297,8 @@ QPushButton:pressed { ...@@ -302,8 +297,8 @@ QPushButton:pressed {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>28</width> <width>24</width>
<height>22</height> <height>24</height>
</size> </size>
</property> </property>
<property name="focusPolicy"> <property name="focusPolicy">
...@@ -334,8 +329,8 @@ QPushButton:pressed { ...@@ -334,8 +329,8 @@ QPushButton:pressed {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>28</width> <width>24</width>
<height>22</height> <height>24</height>
</size> </size>
</property> </property>
<property name="focusPolicy"> <property name="focusPolicy">
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>261</width>
<height>300</height> <height>206</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,1,1,1,30,1"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,1,1,5,1,30,1">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<item> <item>
<widget class="QPushButton" name="clearTrailsButton"> <widget class="QPushButton" name="clearTrailsButton">
<property name="text"> <property name="text">
<string>Clear Trails</string> <string>Clear Map</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -69,6 +69,19 @@ ...@@ -69,6 +69,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QLabel" name="posLabel"> <widget class="QLabel" name="posLabel">
<property name="text"> <property name="text">
......
...@@ -55,8 +55,8 @@ void QGCMapWidget::showEvent(QShowEvent* event) ...@@ -55,8 +55,8 @@ void QGCMapWidget::showEvent(QShowEvent* event)
SetFollowMouse(true); // we want a contiuous mouse position reading SetFollowMouse(true); // we want a contiuous mouse position reading
SetShowHome(true); // display the HOME position on the map SetShowHome(true); // display the HOME position on the map
Home->SetSafeArea(30); // set radius (meters) Home->SetSafeArea(0); // set radius (meters)
Home->SetShowSafeArea(true); // show the safe area Home->SetShowSafeArea(false); // show the safe area
Home->SetCoord(pos_lat_lon); // set the HOME position Home->SetCoord(pos_lat_lon); // set the HOME position
setFrameStyle(QFrame::NoFrame); // no border frame setFrameStyle(QFrame::NoFrame); // no border frame
......
...@@ -15,7 +15,7 @@ QGCUnconnectedInfoWidget::QGCUnconnectedInfoWidget(QWidget *parent) : ...@@ -15,7 +15,7 @@ QGCUnconnectedInfoWidget::QGCUnconnectedInfoWidget(QWidget *parent) :
connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(addLink())); connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(addLink()));
// Overwrite global style sheet // 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 {}"); //ui->connectButton->setStyleSheet("QToolButton {background-color: green; border-radius: 20px; } QButton {} QPushButton {}");
} }
......
...@@ -7,39 +7,72 @@ ...@@ -7,39 +7,72 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>372</width> <width>372</width>
<height>299</height> <height>309</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" rowstretch="90,100"> <layout class="QGridLayout" name="gridLayout" rowstretch="90,30">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QToolButton" name="connectButton"> <widget class="QToolButton" name="connectButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>150</width>
<height>0</height> <height>150</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="baseSize">
<size>
<width>150</width>
<height>150</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true">
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;
}</string>
</property> </property>
<property name="text"> <property name="text">
<string>Click Icon to Connect</string> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../qgroundcontrol.qrc"> <iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/devices/network-wireless.svg</normaloff>:/files/images/devices/network-wireless.svg</iconset> <normaloff>:/files/images/actions/qgroundcontrol-connect.svg</normaloff>:/files/images/actions/qgroundcontrol-connect.svg</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>180</width> <width>140</width>
<height>200</height> <height>140</height>
</size> </size>
</property> </property>
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum> <enum>Qt::ToolButtonIconOnly</enum>
</property> </property>
</widget> </widget>
</item> </item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment