mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
3da912cda8
commit
973b68c304
1 changed files with 6 additions and 1 deletions
|
@ -51,14 +51,19 @@ Rectangle {
|
||||||
id: locationText
|
id: locationText
|
||||||
text: location
|
text: location
|
||||||
color: theme.textColor
|
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
|
transformOrigin: Item.TopLeft
|
||||||
|
elide: Text.ElideRight
|
||||||
|
maximumLineCount: 1 // needed for elide to work at all
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
right: dateLabel.left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
id: dateLabel
|
||||||
text: date
|
text: date
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
color: theme.textColor
|
color: theme.textColor
|
||||||
|
|
Loading…
Add table
Reference in a new issue