Improve interactivity for the user icon and search field in kickoff
Review Request #123530 - Created April 27, 2015 and submitted
This patch makes the user icon and search field clickable. Upon clicking the former, the User Account kcm is opened, in the latter case the search field gets visible and activated.
Everything works as expected, pressing Esc either cancels the search and/or closes the menu popup.
A couple of nitpicky suggestions below :)
If you change it below, change it here too ;)
Does this need to be duplicated? I suppose the hit area for both items should be pretty similar so you could place a single MouseArea one level up.
If you put the TextField outside the MouseArea, you could probably just do
visible: header.state === "hint"
and safe the cursorShape and enabled dance
Personally I don't think anyone needs to open the accounts KCM so often we need to link to it. I suspect it'll get more accidental opens than legit ones.
The other changes seems good though.
Fix a problem with the search text field staying visible between menu opens plus some minor coding style issues pointed out by Kai.
Revision 2 (+57 -25)