From 16061f61e892f724d567514e2d2c5455793b9092 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 6 Apr 2019 01:12:46 +0200 Subject: [PATCH] Minor cockpit COM UI adjustments --- src/blackgui/components/cockpitcomcomponent.h | 2 +- src/blackgui/components/selcalcodeselector.cpp | 6 ++++++ src/blackgui/components/selcalcodeselector.h | 3 +++ src/blackgui/editors/cockpitcomform.cpp | 1 + src/blackgui/share/qss/stdwidget.qss | 4 ++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/blackgui/components/cockpitcomcomponent.h b/src/blackgui/components/cockpitcomcomponent.h index 04566282f..2dc2ddc16 100644 --- a/src/blackgui/components/cockpitcomcomponent.h +++ b/src/blackgui/components/cockpitcomcomponent.h @@ -28,8 +28,8 @@ class QPaintEvent; class QWidget; -namespace BlackMisc { namespace Aviation { class CComSystem; } } namespace Ui { class CCockpitComComponent; } +namespace BlackMisc { namespace Aviation { class CComSystem; } } namespace BlackGui { namespace Components diff --git a/src/blackgui/components/selcalcodeselector.cpp b/src/blackgui/components/selcalcodeselector.cpp index 863047b33..2186b73ca 100644 --- a/src/blackgui/components/selcalcodeselector.cpp +++ b/src/blackgui/components/selcalcodeselector.cpp @@ -105,6 +105,12 @@ namespace BlackGui return ui->cb_SelcalPairs1->height(); } + void CSelcalCodeSelector::setComboBoxMinimumHeight(int h) + { + ui->cb_SelcalPairs1->setMinimumHeight(h); + ui->cb_SelcalPairs2->setMinimumHeight(h); + } + void CSelcalCodeSelector::selcalIndexChanged(int index) { Q_UNUSED(index); diff --git a/src/blackgui/components/selcalcodeselector.h b/src/blackgui/components/selcalcodeselector.h index 4a29be197..13cde88d5 100644 --- a/src/blackgui/components/selcalcodeselector.h +++ b/src/blackgui/components/selcalcodeselector.h @@ -62,6 +62,9 @@ namespace BlackGui //! The height of the combobox int getComboBoxHeight() const; + //! Set the combobox height + void setComboBoxMinimumHeight(int h); + signals: //! Value has been changed void valueChanged(); diff --git a/src/blackgui/editors/cockpitcomform.cpp b/src/blackgui/editors/cockpitcomform.cpp index d9b8296c4..865fb2c61 100644 --- a/src/blackgui/editors/cockpitcomform.cpp +++ b/src/blackgui/editors/cockpitcomform.cpp @@ -134,6 +134,7 @@ namespace BlackGui this->setFrequencies(aircraft.getCom1System(), aircraft.getCom2System()); this->setSelcal(aircraft.getSelcal()); this->setTransponder(aircraft.getTransponder()); + this->alignUiElementsHeight(); } CSelcal CCockpitComForm::getSelcal() const diff --git a/src/blackgui/share/qss/stdwidget.qss b/src/blackgui/share/qss/stdwidget.qss index cafa64b00..10a7ce4e7 100644 --- a/src/blackgui/share/qss/stdwidget.qss +++ b/src/blackgui/share/qss/stdwidget.qss @@ -200,6 +200,10 @@ BlackGui--Components--CStringListDialog background-image: url(:/textures/icons/textures/texture-inner.jpg); } +BlackGui--Components--CCockpitComComponent { + min-height: 7em; +} + /* default for buttons */ QToolButton { background-color: rgba(0, 0, 255, 128);