aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveList.qml
diff options
context:
space:
mode:
authorGravatar Sebastian Kügler <sebas@kde.org>2015-11-12 02:13:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-11 19:06:07 -0800
commit973b68c304d3632f53c71eeb8e8104df72a85175 (patch)
tree992c7fd8f149bd1a040d9899e7ec0ce7742c462c /qt-mobile/qml/DiveList.qml
parent3da912cda8e89d1e7ab0d8bfbf9e4ebefc42c326 (diff)
downloadsubsurface-973b68c304d3632f53c71eeb8e8104df72a85175.tar.gz
Fix label overflow in divelist
- anchor the label to the left of the date field - elide the text instead This fixes the bug in the dive list where the dive's location overflowed over the date, especially visible on phones in portrait mode. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r--qt-mobile/qml/DiveList.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index a72d34ed4..4f147bf6d 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -51,14 +51,19 @@ Rectangle {
id: locationText
text: location
color: theme.textColor
- scale: 1.1 // Let's see how this works, otherwise, we'll need the default point size somewhere
+ //font.pointSize: Math.round(units.fontMetrics.pointSize * 1.2) // why this doesn't work is a mystery to me, so ...
+ scale: 1.2 // Let's see how this works, otherwise, we'll need the default point size somewhere
transformOrigin: Item.TopLeft
+ elide: Text.ElideRight
+ maximumLineCount: 1 // needed for elide to work at all
anchors {
left: parent.left
top: parent.top
+ right: dateLabel.left
}
}
Text {
+ id: dateLabel
text: date
opacity: 0.6
color: theme.textColor