[matchbox] Merge openmoko-keyboard changes

Matthew Allum mallum at openedhand.com
Thu Jun 14 00:38:17 CEST 2007


On Wed, 2007-06-13 at 23:49 +0200, Daniel Willmann wrote:
> > Therefor;
> > 
> >   - Idealy the background image should scale or tile. (being clipped
> > if larger than keyboard window size)
> Tiling/scaling should probably be configurable.


> >  -  The keys are probably best made up by have a series of tiles that 
> >     make up the keys - e.g 4 corner images, 4 edge images (which are 
> >     again tiled or scaled) and finally a center image (also 
> >     tiled/scaled).
> Okay, sounds good. I thought about corner/edge images but it seemed to
> be too much work for the benefit it gives us. On the other hand you
> really do want to have nice corners. :-)

It may not benefit you now but probably will in future if openmoko is
used on hardware with different resolution / DPI displays.

> > This probably all need to be set in a separate 'theme' config file to
> > that of the layout files. Ideally XML based too. The theme file would
> > also define colors for keys when not 
> A separate theme file sounds great. Does that mean that the <options>
> part in the layout file is obsolete? 


> It looks like mostly theme stuff
> goes in there. We should also define the colors for the font there.

In the theme file also ? yep. Maybe also have it define colors for the
borders of keys if images arn't used (like it is now).

So different graphic styles can be used for different 'types' of key
(like it the screen shots posted), it would probably make sense to allow
for multiple groups of graphic images for a key be defined and then use
something like a match attribute to style a particular key - it could
match on action or display attributes in the layout file. For example
something like;

 <key match="any">  <!-- fall back to match anything -->
     <image position="ne" filename="foo.png" />
     <image position="n" filename="foo2.png" />

 <key match="action:modifier"> <!-- All modifier keys -->
     <image position="ne" filename="bar.png" />
     <image position="n" filename="bar2.png" />

 <key match="action:space">  <!--- space bar -->


keys probably need 2 image states also, active and non active :/

> Should the theme be selected in the keyboard layout or should there be
> a command line option or both? I'd go with having a default theme
> setting and optionally specifying one in the keyboard layout.

It shouldn't be referenced by the layout but live in;

 /usr/share/themes/<theme name>/matchbox-keyboard/ XML + images

The theme name would be retrieved idealy by getting the xsetting
Net/Theme key value (potentially be overidden by a command line option).

> > Do you also intend to use the current image painting code contained in
> > matchbox-keyboard or bring in new dependencies ? Would *much* rather
> > use existing image code - it should be enough.
> I'd rather not bring in more libraries and I think the current code
> should suffice.

Cool stuff.
> Okay, great. Thanks for the pointers.

Thank you for offering to do this.

  -- Matthew

More information about the openmoko-apps mailing list