Changing elide in ListItemLayout title not possible
Bug #1603450 reported by
Jonas G. Drange
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Medium
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Medium
|
Andrea Bernabei | ||
ubuntu-ui-toolkit (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Reproduce:
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
width: units.gu(30)
height: units.gu(50)
ListItem {
id: fileLayout
}
}
}
What happens:
The text is not elided at all
What should happen:
Text should elide, and the palindrome edges should be visible:
Red roses run … nurses order.
Related branches
lp://staging/~faenil/ubuntu-ui-toolkit/moreListItemLayoutDocs
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Cris Dywan: Approve
- Jonas G. Drange (community): Approve
-
Diff: 158 lines (+81/-5)2 files modifiedsrc/Ubuntu/UbuntuToolkit/privates/threelabelsslot_p.cpp (+6/-0)
src/Ubuntu/UbuntuToolkit/uclistitemlayout.cpp (+75/-5)
summary: |
- Tweaking elide in ListItemLayout title not possible + Changing elide in ListItemLayout title not possible |
Changed in ubuntu-ui-toolkit (Ubuntu RTM): | |
assignee: | nobody → Andrea Bernabei (faenil) |
assignee: | Andrea Bernabei (faenil) → nobody |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Andrea Bernabei (faenil) |
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
milestone: | none → 13 |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is due to the title's Label having WrapAnywhere as wrapMode. This means only ElideRight will function.
Adding a note of this in the documentation, with an accompanying example [1] about how to get e.g. ElideMiddle to function, would fix this issue.
[1]
import QtQuick 2.4
import Ubuntu.Components 1.3
Item {
width: units.gu(30)
height: units.gu(50)
ListItem {
ListItemLayout {
title. elide: Text.ElideMiddle
title. wrapMode: Text.NoWrap
title. text: "Red Roses run no risk, sir, on nurses order."
id: fileLayout
}
}
}