aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.ui
diff options
context:
space:
mode:
authorGravatar willemferguson <willemferguson@zoology.up.ac.za>2019-11-11 12:52:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-11 20:19:22 +0100
commit08db77333b8a6fe7be71f30bf0d5ee15a6bf01f1 (patch)
tree2a9bced1558a24290e9ab725ef77759a7c15ef96 /desktop-widgets/tab-widgets/maintab.ui
parent2fe1121b1c7493e7951a8f66ce5ac10d11331aa4 (diff)
downloadsubsurface-08db77333b8a6fe7be71f30bf0d5ee15a6bf01f1.tar.gz
Notes tab: Use top RH for depth and duretion fields
Currently the top righthand part of the notes tab is used for showing and editing air teperature and water temperature. But these fields were moved over to the Information tab and are not required in the Notes tab any more. Rather use this space for the depth and duration data for manually-entered dives. Currently extra vertical space is created in the Notes tab for showing this field, resulting in inefficient use of screen space and inelegant layout. This code moves the Duration and Depth fields into the top righthand of the Notes tab. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.ui')
-rw-r--r--desktop-widgets/tab-widgets/maintab.ui130
1 files changed, 83 insertions, 47 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.ui b/desktop-widgets/tab-widgets/maintab.ui
index 8e172f91a..098c67c3c 100644
--- a/desktop-widgets/tab-widgets/maintab.ui
+++ b/desktop-widgets/tab-widgets/maintab.ui
@@ -77,50 +77,74 @@
<property name="verticalSpacing">
<number>0</number>
</property>
- <item row="2" column="3">
- <widget class="QLabel" name="durationLabel">
- <property name="text">
- <string>Duration</string>
+ <item row="0" column="0">
+ <widget class="QLabel" name="dateLabel">
+ <property name="text">
+ <string>Date</string>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="dateLabel">
+ <item row="0" column="1">
+ <widget class="QLabel" name="timeLabel">
<property name="text">
- <string>Date</string>
+ <string>Time</string>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLabel" name="timeLabel">
+ <item row="0" column="2" colspan="2">
+ <widget class="QLabel" name="depthLabely">
<property name="text">
- <string>Time</string>
+ <string> </string>
</property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
<item row="0" column="2">
- <widget class="QLabel" name="airTempLabel">
- <property name="text">
- <string>Air temp.</string>
+ <widget class="QLabel" name="depthLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ <property name="text">
+ <string>Depth</string>
</property>
</widget>
</item>
<item row="0" column="3">
- <widget class="QLabel" name="waterTempLabel">
- <property name="text">
- <string>Water temp.</string>
+ <widget class="QLabel" name="durationLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ <property name="text">
+ <string>Duration (h:mm)</string>
</property>
</widget>
</item>
@@ -132,49 +156,61 @@
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
</item>
<item row="1" column="1">
- <widget class="QTimeEdit" name="timeEdit">
+ <widget class="QTimeEdit" name="timeEdit">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
- </widget>
+ </widget>
</item>
- <item row="1" column="2">
- <widget class="QLineEdit" name="airtemp">
- <property name="readOnly">
- <bool>false</bool>
+ <item row="1" column="2" colspan="2">
+ <widget class="QLabel" name="depthLabelx">
+ <property name="text">
+ <string> </string>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QLineEdit" name="watertemp">
- <property name="readOnly">
- <bool>false</bool>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="depth">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QLabel" name="depthLabel">
- <property name="text">
- <string>Depth</string>
+ <item row="1" column="3">
+ <widget class="QLineEdit" name="duration">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
- </item>
- <item row="3" column="2">
- <widget class="QLineEdit" name="depth"/>
- </item>
- <item row="3" column="3">
- <widget class="QLineEdit" name="duration"/>
- </item>
- </layout>
+ </item>
+ </layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">