[applet] Port to Kirigami.PlaceholderMessage

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



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

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

R97 Bluedevil
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
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.