[applets/notes] Actually hide button row when it's not visible
ClosedPublic

Authored by ngraham on Sun, Mar 22, 9:31 PM.

Details

Summary

Currently the row's opacity is changed from 0% to 100% depending on focus state, but it
does not actually become hidden when at 0% opacity. This means that it's possible to
click the invisible buttons accidentally when focusing the applet. This has been an
issue for a long time, but becomes dangerous with D28064, since you could delete a note
just by clicking in the bottom-right corner to focus the applet!

This patch makes the button row actually hidden when the applet is not focused, not just
100% transparent.

Test Plan

Clicking on the place where a button will appear on an unfocused applet now just focuses
it and does not also click the button.

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Sun, Mar 22, 9:31 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSun, Mar 22, 9:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Sun, Mar 22, 9:31 PM
ngraham edited the summary of this revision. (Show Details)Sun, Mar 22, 9:34 PM
ngraham edited the test plan for this revision. (Show Details)

Wouldn't this cause the text field to resize and shift around? Perhaps set enabled to false instead.

No, there's space reserved for the row even when it's invisible, so the size of the text field doesn't jump around.

davidedmundson accepted this revision.Mon, Mar 23, 6:03 PM
This revision is now accepted and ready to land.Mon, Mar 23, 6:03 PM
This revision was automatically updated to reflect the committed changes.

Wouldn't this cause the text field to resize and shift around? Perhaps set enabled to false instead.

That's something layouts do.