- 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
- Branch
- add-tooltip-textWrapper (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 22043 Build 22061: arc lint + arc unit
Overall well thought out with that State of yours :) Just some minor nitpicks:
applets/taskmanager/package/contents/ui/TextWrapper.qml | ||
---|---|---|
26 | Define it more specifically as property Text textItem | |
51 | You can just make the textWrapper be a MouseArea, saves you having an extra area inside | |
59 | 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 | ||
324–326 | I think this item could use a better name, maybe TextHoverScroller or something like that? | |
330 | QML trick: Define the property as default property and then you can just write TextWrapper { Text { ... } } | |
335 | I think you can assign undefined to reset it to its default value. Plasma Label annoyingly overwrites its height | |
339 | Coding style: space before ? | |
348–362 | 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 |