Make the ATC tool buttons look like push buttons

For some reason turning them into QPushButton breaks the layout.
This way is a simple way to have tool buttons looking like push buttons.

Overall goal: Make cleare what can be clicked.
This commit is contained in:
Klaus Basan
2019-01-21 18:28:18 +01:00
committed by Mat Sutcliffe
parent 9c3ae527aa
commit e46b7f5494
2 changed files with 123 additions and 91 deletions

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>278</width> <width>270</width>
<height>507</height> <height>499</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -179,86 +179,20 @@
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" name="gl_Details"> <layout class="QVBoxLayout" name="vl_Details">
<item row="1" column="1"> <property name="leftMargin">
<widget class="QToolButton" name="tb_AtcStationsLoadMetar"> <number>3</number>
<property name="toolTip"> </property>
<string>Load METAR</string> <property name="topMargin">
</property> <number>3</number>
<property name="text"> </property>
<string>METAR</string> <property name="rightMargin">
</property> <number>3</number>
</widget> </property>
</item> <property name="bottomMargin">
<item row="1" column="2"> <number>3</number>
<widget class="QToolButton" name="tb_AtcStationsAtisReload"> </property>
<property name="toolTip"> <item>
<string>Reload ATIS</string>
</property>
<property name="text">
<string>ATIS</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QToolButton" name="tb_TextMessageOverlay">
<property name="toolTip">
<string>text message</string>
</property>
<property name="text">
<string>tm</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="5">
<widget class="QTextEdit" name="te_AtcStationsOnlineInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="le_AtcStationsOnlineMetar">
<property name="toolTip">
<string extracomment="METAR: Airport ICAO code">METAR: Airport ICAO code</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
<property name="placeholderText">
<string>e.g. KLAX</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="tb_Audio">
<property name="toolTip">
<string>goto audio panel</string>
</property>
<property name="text">
<string>audio</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="5">
<widget class="BlackGui::Components::CSettingsAtcStationsInlineComponent" name="comp_AtcStationsSettings"> <widget class="BlackGui::Components::CSettingsAtcStationsInlineComponent" name="comp_AtcStationsSettings">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@@ -268,6 +202,108 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QWidget" name="wi_ButtonsAndEntry" native="true">
<layout class="QHBoxLayout" name="hl_ButtonsAndEntry">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="le_AtcStationsOnlineMetar">
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string extracomment="METAR: Airport ICAO code">METAR: Airport ICAO code</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
<property name="placeholderText">
<string>e.g. KLAX</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wi_Buttons" native="true">
<layout class="QHBoxLayout" name="hl_Buttons">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="tb_AtcStationsLoadMetar">
<property name="toolTip">
<string>Load METAR</string>
</property>
<property name="text">
<string>METAR</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tb_AtcStationsAtisReload">
<property name="toolTip">
<string>Reload ATIS</string>
</property>
<property name="text">
<string>ATIS</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tb_TextMessageOverlay">
<property name="toolTip">
<string>text message</string>
</property>
<property name="text">
<string>tm</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tb_Audio">
<property name="toolTip">
<string>goto audio panel</string>
</property>
<property name="text">
<string>audio</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTextEdit" name="te_AtcStationsOnlineInfo">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@@ -298,8 +334,8 @@
<tabstop>le_AtcStationsOnlineMetar</tabstop> <tabstop>le_AtcStationsOnlineMetar</tabstop>
<tabstop>tb_AtcStationsLoadMetar</tabstop> <tabstop>tb_AtcStationsLoadMetar</tabstop>
<tabstop>tb_AtcStationsAtisReload</tabstop> <tabstop>tb_AtcStationsAtisReload</tabstop>
<tabstop>tb_Audio</tabstop>
<tabstop>tb_TextMessageOverlay</tabstop> <tabstop>tb_TextMessageOverlay</tabstop>
<tabstop>tb_Audio</tabstop>
<tabstop>te_AtcStationsOnlineInfo</tabstop> <tabstop>te_AtcStationsOnlineInfo</tabstop>
<tabstop>tvp_AtcStationsOnlineTree</tabstop> <tabstop>tvp_AtcStationsOnlineTree</tabstop>
<tabstop>tvp_AtcStationsBooked</tabstop> <tabstop>tvp_AtcStationsBooked</tabstop>

View File

@@ -94,14 +94,6 @@ BlackGui--Components--CSetupLoadingDialog #fr_Details {
} }
*/ */
/* core settings */
/* needed for CCoreSettingsDialog */
/* BlackGui::Components::CSettingsComponent */
BlackGui--Components--CCoreSettingsDialog {
background: black; /* background is background color here */
background-image: url(:/textures/icons/textures/texture-inner.jpg);
}
QFileDialog #sidebar { QFileDialog #sidebar {
background: black; background: black;
} }
@@ -212,6 +204,10 @@ QToolButton {
border: 0px; border: 0px;
} }
#tb_AtcStationsAtisReload,
#tb_AtcStationsLoadMetar,
#tb_Audio,
#tb_TextMessageOverlay,
QPushButton { QPushButton {
background-color: rgba(0, 0, 255, 128); background-color: rgba(0, 0, 255, 128);
border-style: 1px solid yellow; border-style: 1px solid yellow;