diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-06-08 11:03:10 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-06-08 12:27:50 -0700 |
commit | 8a4a9382d39fc5074ca36d51b4730e77806e3405 (patch) | |
tree | 0e7491b40178de3d19d528ffc17ed24eb8cf812b | |
parent | e00e72d430b60f8b446d295f0aa7c19f91b82fea (diff) | |
download | subsurface-8a4a9382d39fc5074ca36d51b4730e77806e3405.tar.gz |
mobile/dive-details: restrict width of tags field
Having a lot of tags (or more precisely, a tags string that is very long) could
cause the width of the dive details view to extend past the width of the the
page. The txtTags label was missing a maximum width, and to make the result
more useful, I also added correct wrapping and elide to the mix (stupidly, we
had the wrap and width for the fixed name of the field ('Tags'), but not for
the user determined content of that field).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveDetailsView.qml | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fefcf10a..13299c871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +Mobile: correct UI issue with tags that were longer than page width Mobile: add advanved option to import dives from local cloud cache directories Mobile: fix broken editing of location, suit, buddy, and dive master Mobile: fix missing translations on Android diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index 54e188fe9..bd6fbbd89 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -519,9 +519,8 @@ Item { TemplateLabelSmall { text: qsTr("Tags:") opacity: 0.6 - wrapMode: Text.WrapAtWordBoundaryOrAnywhere Layout.columnSpan: 3 - Layout.maximumWidth: detailsView.col2Width + detailsView.col3Width + Layout.maximumWidth: detailsView.gridWidth Layout.bottomMargin: 0 color: subsurfaceTheme.textColor } @@ -532,6 +531,10 @@ Item { id: txtTags text: tags wrapMode: Text.WrapAtWordBoundaryOrAnywhere + elide: Text.ElideRight + maximumLineCount: 3 + Layout.maximumWidth: detailsView.gridWidth + height: Kirigami.Units.gridUnit * 3 Layout.columnSpan: 3 color: subsurfaceTheme.textColor } |