[Notes applet] Wrap in FocusScope
ClosedPublic

Authored by broulik on Jul 8 2017, 2:11 PM.

Details

Summary

Allows to leverage FocusScope's activeFocus property to determin whether we the text field or formatting buttons have focus.

Test Plan

Clicked in text field, tabbed through the applet successfully; formatting buttons only hid when I clicked outside the applet.

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.
broulik created this revision.Jul 8 2017, 2:11 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 8 2017, 2:11 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik updated this revision to Diff 16355.Jul 8 2017, 2:12 PM
  • Be explicit about opacity 1 or 0

Is this any different from the current opacity binding?

Well, it's a lot more compact. All the items that I explicitly checked in the previous code are inside the FocusScope now

davidedmundson accepted this revision.Jul 8 2017, 2:23 PM

Yep, just wanted to check that I'd understood the goal of the patch.

applets/notes/package/contents/ui/main.qml
134

you've added an extra margin to the bottom.

This revision is now accepted and ready to land.Jul 8 2017, 2:23 PM
broulik added inline comments.Jul 8 2017, 2:25 PM
applets/notes/package/contents/ui/main.qml
134

That's the bottomMargin the fontButtons Row originally had. I moved all the margins to the FocusScope and then just anchored the items inside without.

This revision was automatically updated to reflect the committed changes.