aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-25 13:41:16 +0530
committerSuchinton Chakravarty <suchinton.2001@gmail.com>2024-10-25 13:41:16 +0530
commit18fdc7e1bcf160f8e9bbad406f1556c3d1911734 (patch)
treee30287f16c4982bad9ab65073f1d6aa98753fc14
parent6fdddee7d45206dc64eacd08700f79566ad9b4a6 (diff)
Patch Update: Fix Floating Tire Pressure VisibilityHEADmaster
This commit patches a bug where the toggle button for Tire Pressure Window was clipped and would not switch checked state properly. It also avoids rescaling the floating window at toggle event, instead now hideing and unhiding the window. Bug-AGL: SPEC-5161 Change-Id: I4863fc6d0fa538884441835fe043b9748e0f0a1e Signed-off-by: Suchinton Chakravarty <suchinton.2001@gmail.com>
-rw-r--r--Widgets/ICPage.py5
-rw-r--r--ui/IC.ui107
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):
diff --git a/ui/IC.ui b/ui/IC.ui
index ad50997..a128953 100644
--- a/ui/IC.ui
+++ b/ui/IC.ui
@@ -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>