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(new Ui::CAircraftComponent), m_timerComponent(nullptr)
{ {
ui->setupUi(this); ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce); this->ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce);
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this); m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);

View File

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

View File

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

View File

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

View File

@@ -23,6 +23,8 @@ namespace BlackGui
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CFlightPlanComponent) QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CFlightPlanComponent)
{ {
ui->setupUi(this); ui->setupUi(this);
this->tabBar()->setExpanding(false);
connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::sendFlightPlan); connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::sendFlightPlan);
connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::loadFlightPlanFromNetwork); connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::loadFlightPlanFromNetwork);
connect(this->ui->pb_Reset, &QPushButton::pressed, this, &CFlightPlanComponent::resetFlightPlan); 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 * Constructor
*/ */
CSettingsComponent::CSettingsComponent(QWidget *parent) : 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) m_audioTestRunning(NoAudioTest)
{ {
ui->setupUi(this); ui->setupUi(this);
this->tabBar()->setExpanding(false);
this->ui->prb_SettingsAudioTestProgress->setVisible(false); this->ui->prb_SettingsAudioTestProgress->setVisible(false);
this->m_timerAudioTests = new QTimer(this); this->m_timerAudioTests = new QTimer(this);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -296,7 +296,6 @@ namespace BlackGui
this->m_tabBar->setObjectName("comp_MainInfoAreaDockWidgetTab"); this->m_tabBar->setObjectName("comp_MainInfoAreaDockWidgetTab");
this->m_tabBar->setMovable(false); this->m_tabBar->setMovable(false);
this->m_tabBar->setElideMode(Qt::ElideNone); this->m_tabBar->setElideMode(Qt::ElideNone);
this->setDocumentMode(true); // did not notice any effect
this->setTabPixmaps(); this->setTabPixmaps();
// East / West does not work (shown, but area itself empty) // 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 { QMenuBar::item:pressed {
background: black; background: black;
} }
QMenu { QMenu {
border: 2px solid darkslategray; /* reserve space for selection border */ border: 2px solid darkslategray; /* reserve space for selection border */
background: lightgray; background: lightgray;
color: black; color: black;
padding: 2px; padding: 2px;
}
QScrollArea {
border: 1px solid green;
border-radius: 5px;
} }
QScrollBar:horizontal { QScrollBar:horizontal {