[applet] Port to Kirigami.PlaceholderMessage
ClosedPublic

Authored by ngraham on Apr 22 2020, 9:08 PM.

Details

Summary

This patch ports the Bluetooth applet to use Kirigami.PlaceholderMessage. In the
process, and as a necessary precondition, it also refactors the code to be more
declarative.

Test Plan

Everything still works perfectly and there are no visual changes aside from the message
having the same margins etc as all the other ones now:

Diff Detail

Repository
R97 Bluedevil
Branch
port-to-PlaceholderMessage (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25723
Build 25741: arc lint + arc unit
ngraham created this revision.Apr 22 2020, 9:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 22 2020, 9:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Apr 22 2020, 9:08 PM

It seems like the button never gets out of hovered state:

That's the focus state, not the hovered state. If I hit the tab key, focus goes somewhere else. Do you see the same?

Correct, but shouldn't the focus state stop after button press, or when I click away, or at least when I close the applet? Or am I getting the concept of focus wrong?

Well, this is the way we handle focus everywhere in KDE. When you press a focusable button, that button gains focus and retains it even after being pressed.

IMO the only issue here is the super-obvious-bordering-on-overwhelming way we visually show focus, which turns the whole button blue and makes it stand out a bit toomuch (IMO).

niccolove accepted this revision.Apr 22 2020, 9:36 PM

Yeah, I agree. I see that this behavior is consistent, so I'll accept it.

This revision is now accepted and ready to land.Apr 22 2020, 9:36 PM
This revision was automatically updated to reflect the committed changes.
broulik added a subscriber: broulik.May 1 2020, 8:22 PM

This now gives me a tiny icon on the button because this is a Kirigami component using desktop style:

Works for me with a 1x scale factor. Seems like a pre-existing scaling bug.

filipf added a subscriber: filipf.May 1 2020, 9:14 PM

Yeah we shouldn't be mixing Kirigami with Plasma.