Some GUI finetuning

* tabBar expanding
* removed setDocumentMode
* Flight plan in scroll area
This commit is contained in:
Klaus Basan
2014-09-28 01:51:08 +02:00
parent e545288630
commit e929423fc9
14 changed files with 893 additions and 691 deletions

View File

@@ -27,6 +27,7 @@ namespace BlackGui
ui(new Ui::CAircraftComponent), m_timerComponent(nullptr)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce);
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>

View File

@@ -33,6 +33,7 @@ namespace BlackGui
ui(new Ui::CAtcStationComponent), m_timerComponent(nullptr)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
// some icons

View File

@@ -10,8 +10,14 @@
<height>462</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
<string>ATC stations</string>
</property>
<property name="currentIndex">
<number>0</number>

View File

@@ -23,6 +23,8 @@ namespace BlackGui
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CFlightPlanComponent)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);
connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::sendFlightPlan);
connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::loadFlightPlanFromNetwork);
connect(this->ui->pb_Reset, &QPushButton::pressed, this, &CFlightPlanComponent::resetFlightPlan);

File diff suppressed because it is too large Load Diff

View File

@@ -38,10 +38,13 @@ namespace BlackGui
* Constructor
*/
CSettingsComponent::CSettingsComponent(QWidget *parent) :
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CSettingsComponent),
QTabWidget(parent),
CRuntimeBasedComponent(nullptr, false),
ui(new Ui::CSettingsComponent),
m_audioTestRunning(NoAudioTest)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->ui->prb_SettingsAudioTestProgress->setVisible(false);
this->m_timerAudioTests = new QTimer(this);
}

View File

@@ -20,7 +20,7 @@
<string>Settings</string>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
<attribute name="title">

View File

@@ -21,7 +21,8 @@ namespace BlackGui
namespace Components
{
CSettingsSimulatorComponent::CSettingsSimulatorComponent(QWidget *parent) :
QFrame(parent), CRuntimeBasedComponent(nullptr, false),
QFrame(parent),
CRuntimeBasedComponent(nullptr, false),
ui(new Ui::CSettingsSimulatorComponent)
{
ui->setupUi(this);

View File

@@ -10,6 +10,12 @@
<height>375</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
</property>

View File

@@ -26,6 +26,7 @@ namespace BlackGui
ui(new Ui::CUserComponent), m_timerComponent(nullptr)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
connect(this->ui->tvp_AllUsers, &CUserView::countChanged, this, &CUserComponent::ps_countChanged);

View File

@@ -10,6 +10,12 @@
<height>300</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
</property>

View File

@@ -296,7 +296,6 @@ namespace BlackGui
this->m_tabBar->setObjectName("comp_MainInfoAreaDockWidgetTab");
this->m_tabBar->setMovable(false);
this->m_tabBar->setElideMode(Qt::ElideNone);
this->setDocumentMode(true); // did not notice any effect
this->setTabPixmaps();
// East / West does not work (shown, but area itself empty)

View File

@@ -198,14 +198,19 @@ QMenuBar::item:selected { /* when selected using mouse or keyboard */
}
QMenuBar::item:pressed {
background: black;
background: black;
}
QMenu {
border: 2px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
padding: 2px;
border: 2px solid darkslategray; /* reserve space for selection border */
background: lightgray;
color: black;
padding: 2px;
}
QScrollArea {
border: 1px solid green;
border-radius: 5px;
}
QScrollBar:horizontal {