- When the text is truncated, we could hover over it to read the full text
Details
- Reviewers
ndavis ngraham - Group Reviewers
Plasma VDG - Maniphest Tasks
- T12640: Refine Task Manager tooltips
- Commits
- R119:c8a7a3bd98a8: Scroll the truncated song/artist text when long hovering over it
Everything works well
Diff Detail
- Repository
- R119 Plasma Desktop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Overall well thought out with that State of yours :) Just some minor nitpicks:
applets/taskmanager/package/contents/ui/TextWrapper.qml | ||
---|---|---|
25 ↗ | (On Diff #74981) | Define it more specifically as property Text textItem |
50 ↗ | (On Diff #74981) | You can just make the textWrapper be a MouseArea, saves you having an extra area inside |
58 ↗ | (On Diff #74981) | You can simplify this long duration handling a bit: Timer { interval: 500 running: area.containsMouse onTriggered: { area.state = "longHovering" } } and then all you need is onContainsMouseChanged: { if (!containsMouse) { area.state = ""; } } I *think* you could even do it more declaratively by having the State do when: area.containsMouse && !timer.running but since property evaluation order is non-deterministic, it might briefly enter the state on hover |
applets/taskmanager/package/contents/ui/ToolTipInstance.qml | ||
258–260 | I think this item could use a better name, maybe TextHoverScroller or something like that? | |
263 | QML trick: Define the property as default property and then you can just write TextWrapper { Text { ... } } | |
268 | I think you can assign undefined to reset it to its default value. Plasma Label annoyingly overwrites its height | |
272 | Coding style: space before ? | |
281–294 | Generally try to avoid binding to visible as that updates recursively. Since this contains the label below, you can probably just make this visible: artistText.text !== "" and then remove the visible statement below |