If I had to start developing a new commercial app I would seriously look at XUL.
- Joel Spolsky
If I had to start developing a new commercial app I would seriously look at XUL.
Woman: From where would you order a pizza for delivery?
Me: I've never ordered a pizza.
Woman: But where would you order a pizza from?
Me: I wouldn't.
Woman: But if you did, where would you order it from?
Me: But I wouldn't order one.
Woman: Well let's say you did. Where from?
Me: I wouldn't order one from anywhere, because I wouldn't order one!
This went on for a while. Eventually I gave in and made something up. That was two years ago. Recently I ordered a pizza. I feel so guilty.
textarea { -moz-binding: url('resource:///res/builtin/myHTMLBindings.xml#textAreas'); }
Now, create a file res/builtin/myHTMLBindings.html in the Mozilla directory (or another file pointed to by the binding above). Add the following to it:
<xml version="1.0"?> <bindings id="htmlBindings" xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <binding id="textAreas" extends="resource:///res/builtin/platformHTMLBindings.xml#textAreas"> <handlers> <handler event="keypress" keycode="VK_LEFT" modifiers="alt"> var siz=parseInt(window.getComputedStyle(this,null). getPropertyValue("width")); if (siz > 36) this.style.width=(siz-8)+"px"; event.preventDefault(); </handler> <handler event="keypress" keycode="VK_RIGHT" modifiers="alt"> var siz=parseInt(window.getComputedStyle(this,null). getPropertyValue("width")); this.style.width=(siz+16)+"px"; event.preventDefault(); </handler> <handler event="keypress" keycode="VK_UP" modifiers="alt"> var siz=parseInt(window.getComputedStyle(this,null). getPropertyValue("height")); if (siz > 36) this.style.height=(siz-8)+"px"; event.preventDefault(); </handler> <handler event="keypress" keycode="VK_DOWN" modifiers="alt"> var siz=parseInt(window.getComputedStyle(this,null). getPropertyValue("height")); this.style.height=(siz+16)+"px"; event.preventDefault(); </handler> </handlers> </binding> </bindings>
You might want to change the keys used. A similar technique can be used for other text fields.
I wonder why the preferences in Phoenix are so strangely organized? Or why they used the Orbit theme icons instead of these?