Had to muck about with event handling a bit to mimic the behaviour of Cascades.
Add getCaption() and getImage() for buttons.
It appears that 1ap1 has implemented the same fix...
Add CSS and JS to show the eye icon for passwords
TODO: handle focus blurring when hitting the eye.
Kill swp files
Add JS to show/hide password for password inputs
Merge remote-tracking branch 'upstream/master' into 513_showpasswd
It looks like you have the getCaptin and getImage for buttons on this pull request. Can you possibly remove them so that this pull request is reduced to just the password "eye"?
I also noticed that the eye that is being used is only in blue. We would want to make the eye available in the the highlight color theme specified in the init().
Maybe there's a color mask that could be applied through canvas, or draw the eye from scratch in canvas. There's an example of how I do this for activity indicators that you can look at
Thanks for pointing out the getCaption code seeping into this issue. I'll see what I can do about the icon.
Fix password eye icon to support highlightColor
* use -webkit-image-mask to change color
* refactor textInput code a bit
Instead of canvas, I used -webkit-image-mask. Here's the result:
This relies on a bitmap but seems like a good tradeoff: it's trivial to change the colour of the icon by changing the icon's background-color; it's also AFAICT computationally lighter than drawing on a canvas (albeit not as fun). The eye icon is not of the highest quality at the moment since I hastily added transparency into the original screenshot icon by hand, but I'll redraw the whole thing in vector later tonight to make it pixel sharp.
Replace eye icon with a sharper one
I've redrawn the icon in Inkscape. The resulting PNG is much leaner, hooray. Here's the SVG file if you need it for some reason. Let me know if this works. Do I need to perform another pull request or can you merge the head of the 513_showpasswd branch from here?
I see a commit 4aee7bc that shows "Replace eye icon with a sharper one".. does that contain everything you need?
Yeah. That's the PNG mask that I use to carve out the button.
Cool.. I'm out on vacation for March Break, I'll look at merging it in after that