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>
This commit is contained in:
Sebastian Kügler 2015-11-12 02:13:47 +01:00 committed by Dirk Hohndel
parent 3da912cda8
commit 973b68c304

View file

@ -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