Rotating a button leads to tooltips being broken, it will lead to
shadows being broken on a theme that uses shadows and is generally not
great.
This patch sets the contentItem explicitly and rotates that
BUG: 412092
ngraham | |
romangg |
Plasma |
Rotating a button leads to tooltips being broken, it will lead to
shadows being broken on a theme that uses shadows and is generally not
great.
This patch sets the contentItem explicitly and rotates that
BUG: 412092
No Linters Available |
No Unit Test Coverage |
Buildable 17771 | |
Build 17789: arc lint + arc unit |
An alternative approach could have been to set a custom content item and rotate only that.
But I actually quite like the the "arrow" in the new icons.
(Also, why is this a switch in Component.onCompleted and not just bindings...)
Hmm, the "no rotation" and "upside down" icons aren't accurate anymore (especially "no rotation").
From usability perspective I don't like the arrow. It is not as easy to grasp what will be the outcome since you have a current state and a transformation of that applied to symbolize a different state (the rotated one). Directly showing the rotated state, i.e. the outcome, like the current icons do is more easy to grasp imo.
That being said the current implementation is obviously broken and using separate icons for that could be a solution. Maybe using @broulik's custom content approach would be a good solution for that as well?
I agree with roman that the rotated icons are preferable from a usability perspective. Maybe we need new icons then? VDG
I would still suggest overriding the contentItem of the Button and put a rotated Kirigami.Icon in there without actually transforming the entire button.
kcm/package/contents/ui/RotationButton.qml | ||
---|---|---|
61–62 | Kirigami.units.smallSpacing instead of hardcoded 2 |
kcm/package/contents/ui/RotationButton.qml | ||
---|---|---|
43 | why not just use rotation property? |