diff options
-rw-r--r-- | Widgets/ICPage.py | 5 | ||||
-rw-r--r-- | ui/IC.ui | 107 |
2 files changed, 66 insertions, 46 deletions
diff --git a/Widgets/ICPage.py b/Widgets/ICPage.py index a298d2b..3b03b35 100644 --- a/Widgets/ICPage.py +++ b/Widgets/ICPage.py @@ -209,12 +209,13 @@ class ICWidget(Base, Form): def toggle_TirePressureDock(self): if self.TirePressureBtn.isChecked(): self.Hide_TirePressure(True) + self.TirePressureBtn.setChecked(True) else: self.Hide_TirePressure(False) + self.TirePressureBtn.setChecked(False) def Hide_TirePressure(self, bool_arg): - widthExtended = 0 if bool_arg else 400 - self.TirePressureDock.setFixedWidth(widthExtended) + self.TirePressureDock.setVisible(bool_arg) def Playback_connections(self): @@ -44,6 +44,10 @@ QPushButton:pressed { background-color: #4BD7D6 ; /* light blue */ } +QPushButton:checked { + background-color: #965D62 ; /* red */ +} + QSlider::groove:horizontal { background-color: #131313 ; /* black */ border: 1px solid #6C6C85 ; /* pastel purple */ @@ -190,6 +194,21 @@ QLCDNumber { <bool>false</bool> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <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="TirePressure" name="TirePressure" native="true"/> </item> @@ -838,6 +857,50 @@ QLCDNumber { </property> <layout class="QHBoxLayout" name="horizontalLayout"> <item> + <widget class="QPushButton" name="TirePressureBtn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>50</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <family>Open Sans</family> + <pointsize>20</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../assets/res.qrc"> + <normaloff>:/Images/Images/tire-pressure.svg</normaloff>:/Images/Images/tire-pressure.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>40</width> + <height>40</height> + </size> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> + </item> + <item> <widget class="QFrame" name="frame_6"> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> @@ -847,50 +910,6 @@ QLCDNumber { </property> <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <widget class="QPushButton" name="TirePressureBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <family>Open Sans</family> - <pointsize>20</pointsize> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="../assets/res.qrc"> - <normaloff>:/Images/Images/tire-pressure.svg</normaloff>:/Images/Images/tire-pressure.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </item> - <item> <spacer name="horizontalSpacer_6"> <property name="orientation"> <enum>Qt::Horizontal</enum> |