[Cuis] Better Themes

Phil (list) pbpublist at gmail.com
Fri May 18 16:56:05 CDT 2012


Casey,

Since you mention it... :-)

My Smalltalk projects right now are focussed on using Android (Cuis on CodDroid which is a lightly modified CogVM).  Part of that effort is going to include creating at least a basic mobile theme in which everything needs to be larger to accommodate the touch-based nature of mobile devices (i.e. larger images/text to support larger hit areas.)  While my effort is focussed on Android, I would hope that at least some of it (esp. themes) would be applicable to other mobile platforms such as iOS and WinMo (or whatever they're calling it this week.)  The short term goal is to make everything bigger in a static way (i.e. everything is just a larger fixed size) but the longer term desire would be to support some sort of scalable theme approach where the user could decide how large/small to scale the UI.  I  literally just started to look at creating a custom theme by creating a Theme subclass and got a few icons loaded via ContentPack (not sure if I did it the 'correct' way since the comments seem acknowledge that the correct way is currently undocumented :-)  Of course then I ran into the issue of the visual layout code appearing to be relatively hardcoded for a UI of a fixed size, started poking around at what I thought I needed to change and managed to crash the UI a few times before taking a break.

Any pointers re: how Theme and ContentPack are intended to be used would be helpful.  What I got from reading some of the code comments was that the final approach hasn't solidified yet, so simply having the code and image assets for one of the built-in themes as files on disk (rather than pre-baked into the image) along with docs on how to add it to the image would probably do the trick.  Also, any pointers on code considerations for scaling up the UI in size for this effort are greatly appreciated.

Finally, have you guys started thinking about the implications of multiple display densities as it relates to the UI and themes? (i.e. l/m/h/xh(dpi) on Android or 'retina' on iOS and sounds like it's coming soon on Macs)

Thanks,
Phil

On May 18, 2012, at 5:19 PM, Casey ransberger wrote:

> Hello all,
> 
> Juan and I did what we could to make the look of Cuis fluid to the industrious user. Since we're all talking about Cuis on this list now, I thought I'd say: those themes aren't set in stone, and I'm not totally thrilled with most of them. I think the best we have is the one Juan did, which is the current default.
> 
> The default is (I hope!) entirely represented by class Theme in Cuis. All other themes are subclasses of Theme (IIRC) but there are some other things which are possible. Nothing stops you from subclassing a subclass of Theme, and on and on. I was also able to do some really wild stuff with DNU hacks! But alas, we don't like those much in the core of the system:) so we didn't use that (though there's nothing stopping an external package from doing so.)
> 
> Theme is (as has been pointed out) more limited than what Polymorph did. Polymorph, though, is huuuuuge and not in the spirit of Cuis, which is why I got the idea to write Theme in the first place. OTOH, Theme is *one class.* Given that it affects the whole UI in pretty deep ways, though, I think it's okay for it to be a largish class, as long as we are vigilant about protocoling our methods responsibly.
> 
> Here's where I'm going. If you do play around with the skinning system, please let the list know when you find something you wish it did but doesn't currently. I can help with that, Juan can help with that, and if you can help with that: thank you!
> 
> Most of the current non-default themes have been provided as examples of how to do it. I don't love them: we should make them awesome better.
> 
> We're small, but we're damned good-looking, and looking better all the time.
> 
> --C
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org




More information about the Cuis mailing list