[PATCH 1/2] Separate text labels for air and water temperatures

subsurface at henrik.synth.no subsurface at henrik.synth.no
Sat Nov 30 02:13:40 UTC 2013


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

The "air / water Temperatures" label didn't look to good.

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
 qt-ui/maintab.cpp |  6 ++++--
 qt-ui/maintab.ui  | 21 ++++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index ca0aba9..5d4e0e5 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -352,8 +352,9 @@ void MainTab::updateDiveInfo(int dive)
 			ui.visibilityLabel->setVisible(false);
 			ui.tagWidget->setVisible(false);
 			ui.TagLabel->setVisible(false);
-			ui.TemperaturesLabel->setVisible(false);
+			ui.airTempLabel->setVisible(false);
 			ui.airtemp->setVisible(false);
+			ui.waterTempLabel->setVisible(false);
 			ui.watertemp->setVisible(false);
 			// rename the remaining fields and fill data from selected trip
 			dive_trip_t *currentTrip = *mainWindow()->dive_list()->selectedTrips().begin();
@@ -378,8 +379,9 @@ void MainTab::updateDiveInfo(int dive)
 			ui.DivemasterLabel->setVisible(true);
 			ui.TagLabel->setVisible(true);
 			ui.tagWidget->setVisible(true);
-			ui.TemperaturesLabel->setVisible(true);
+			ui.airTempLabel->setVisible(true);
 			ui.airtemp->setVisible(true);
+			ui.waterTempLabel->setVisible(true);
 			ui.watertemp->setVisible(true);
 			/* and fill them from the dive */
 			ui.rating->setCurrentStars(d->rating);
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 413953b..3a36a95 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -65,11 +65,22 @@
          </widget>
         </item>
         <item row="1" column="1">
-         <widget class="QLabel" name="TemperaturesLabel">
-          <property name="text">
-           <string>air / water Temperatures</string>
-          </property>
-         </widget>
+         <layout class="QHBoxLayout" name="temperatureLabels">
+          <item>
+           <widget class="QLabel" name="airTempLabel">
+            <property name="text">
+             <string>Air temp</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="waterTempLabel">
+            <property name="text">
+             <string>Water temp</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
         </item>
         <item row="2" column="0">
          <widget class="QDateTimeEdit" name="dateTimeEdit">
-- 
1.8.3.4 (Apple Git-47)



More information about the subsurface mailing list