This also fixes a bug where the box could be too small.
BUG: 400862
Details
- Reviewers
nicolasfella - Group Reviewers
KDE Connect - Commits
- R224:9fc55c72f054: Use plasma TextArea for sharing text in plasmoid
Diff Detail
- Repository
- R224 KDE Connect
- Branch
- fixsharetext (branched from master)
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 4772 Build 4790: arc lint + arc unit
This works on my computer. I have attached a screenshot. The borders, etc. look good with one line as well as many lines
@apol Is the best for giving feedback on this. My concerns would be:
- Does using the Plasma TextArea make us dependent on Plasma, or was that already implied by being a plasmoid?
- What does the Plasma TextArea offer vs. the QtQuickControls 2 TextArea?
plasmoid/package/contents/ui/DeviceDelegate.qml | ||
---|---|---|
254 | Magic numbers are to be avoided. If the constant offset is necessary, it would be best to give it a name by adding a readonly property <type> <name>: <value> then use the name. That way, at least it is clear what the thing being added is. Bonus points for a comment on the line declaring the property to say how it was calculated or its purpose :) I would like to see a comment explaining what Math.max is calculating. In case of an unbounded height, it seems quite strange. |
Does using the Plasma TextArea make us dependent on Plasma, or was that already implied by being a plasmoid?
We're using Plasmacomponents elsewhere in the plasmoid already. It creates a runtime dep on plasma-framework, but that doesn't harm using KDE Connect outside of Plasma
I found a more elegant solution: Use the Textfield from Plasmacomponents 3. Include it via
import org.kde.plasma.components 3.0 as PC3
And then use
PC3.TextField { ... }
without setting any height
Do we need both PlasmaComponents 2 and PlasmaComponents 3? (Does it make a difference?)