How to create a modern desktop themeBy Chris Wraight. Published: 4th Oct 2006, 01:04:34 | Permalink | Printable
More to life than drab 16 colours of 1994 [Updated]In a precis of RISC OS for OSNews, Chris Wraight stunned us with a set of previously unseen toolsprites in his article's screenshots. Here he explains how RISC OS can be given a more modern gloss, and how he created the stylish desktop theme - which is now available for download from drobe.co.uk.
New looks for RISC OS
The RISC OS desktop, with all its many virtues, has been stuck with more or less the same set of widgets and furniture for several years now. There's nothing intrinsically wrong with Acorn's designs: at the time of the release of NewLook - which set the basic style still used today - the RISC OS 3 user interface compared respectably with the Windows and Mac desktops of the era. However, things have moved on, and the standard RISC OS desktop looks somewhat tired in comparison to contemporary alternatives. The screenshot below shows how things appear for most users:
Dull salt and pepper grey design from the 1990s
Most of the pictured elements here date from a time when RISC OS desktops used 16 colours, and as a result rely on an eight-colour grey-scale to achieve the 3D effect of raised buttons and window tools. Modern systems generally run 8-, 16- or 32-bit displays, so there's plenty of scope to improve on this rather basic setup. Indeed, there's been some progress in recent years: both RISC OS 4 and 5 make use of 256-colour icons in Filer displays, and newer versions of RISC OS Select allow some OS gadgets to be re-coloured and graduated. However, in my view, which is not universally shared judging by some criticism of Select's cosmetic enhancements on the web, these have been somewhat piecemeal: even the most modern desktops look dated compared to alternatives.
However, there are things you can do to improve the situation. The purpose of this article is (a) to demonstrate the extent to which it is possible to tart-up the RISC OS desktop, and (b) to outline certain simple improvements the OS developers could take which would enable more comprehensive 'skinning' to take place.
The elements of the desktop
If you take a look at the first screenshot again, you'll see that the graphical elements of the various windows fall into three rough categories:
- Desktop icons, used to represent objects such as disk drives and files;
- Window furniture: tool gadgets, scrollbars, background textures;
- Gadgets used in windows, such as action buttons, slider bars, frames, etc.
The good news is that you can completely replace the first two element types with your own graphics, giving the desktop a substantially different appearance. Window gadgets are slightly more complicated: some can be replaced if they're simple sprites, such as the option and radio buttons, but others rely on the OS to be redrawn and are less configurable - such as action buttons, frames and information fields. Under Select, this situation is improved somewhat, but is still not entirely ideal, as we'll see later.
Using your own sprite files
Right, let's make a start. The first thing to do is to make copies of the files the OS uses. There are two spritefiles you're after: a 'Tools' file which controls the window furniture minus the background textures, and a 'Sprites' file which is huge and defines the graphics for everything else, including textures, standard file icons, simple sprite gadgets, and other bits and bobs.
You can do this by going to the Apps folder on the iconbar and choosing 'Open $' from its iconbar menu. This will open a window with three or more directories. Open the 'Resources' directory, and from within that open the 'Wimp' directory. Inside, there should be the two files you need to make copies of: 'Sprites22' (or 'Sprites' if you're working in low-res) and 'Tools'. Save a copy of each somewhere safe.
Now have a look through your copies and see how they're designed. There are a lot of sprites to look at, but bear in mind that you won't have to redefine all of them to make substantial changes to the OS. If you only work in high resolution, then you need only edit sprites with the '22' suffix, and unless you're really keen there's no need to edit all the sprites used for the various files RISC OS knows about.
One thing to observe is the colour depth of the sprites. If you're using a flavour of RISC OS 4, including Select, you'll notice that most are either 16-colour or fixed-palette 256-colour sprites. On RISC OS 5, most of the sprites are optimised-palette 256-colour sprites. However, you're not constrained to use the same colour depth with your replacements. All modern versions of RISC OS can cope with high-colour icons and tools, so in my view there's no excuse for using 16-colour sprites any longer.
In my experience, sprites used as Tools can cause problems if they have their own palette, so I would recommend designing these as 16-bit sprites, which grants you 32 thousand colours, without a palette. All other graphics can use definable-palette 256-colour sprites, which save some memory. An exception to this is the window and menu background textures: these come in several varieties to cater for different colour depth displays, so you should retain the same colour model in each when designing replacements.
Another issue is transparency. On Select, you can define sprites with an Alpha channel. This enables you to create variable degrees of opacity, rather than the simple 100% transparent mask used by earlier versions of RISC OS 4 and current versions of RISC OS 5. This is a great feature, especially for designing sprites with irregular outlines, such as application icons, as the edges can now be anti-aliased for any colour backdrop, not just the normal light-grey. However, the lack of a similar facility on the Iyonix means that you shouldn't use it unless you want your snazzy new icons to be confined to machines with Select only.
Once you've rummaged through the files and worked out which sprites go where, replacing the default set is simply a matter of editing those sprites you wish to change, usually keeping the dimensions the same, and saving the new files somewhere safe. A description of how the different sprites fit together is described in the RISC OS Programmers Reference Manual, in particular volume 3 page 25 onwards.
Each sprite component in a window's furniture is given a name which corresponds to its location around a window. bicon and pbicon are the back icon and the pushed in back icon. cicon is the close icon. tbarlcap/ptbarlcap is the left hand title bar end cap. tbarmidt/ptbarmidt is the middle top half of the title bar. tbarmidb/ptbarmidb is the middle bottom half of the title bar. tbarrcap/ptbarrcap is the title bar right hand end cap. ticon, ticon1 are the two toggle icon states. uicon/puicon is the scroll bar up arrow. dicon/pdicon is the scroll bar down arrow. vwelltcap is the vertical scroll well top end cap. vwellt is the vertical scroll well top section. vbart/pvbart is the vertical scroll bar top end cap. vbarmid/pvbarmid is the vertical scroll bar middle section. vbarb/pvbarb is the vertical scroll bar bottom end cap. vwellb is the vertical scroll well bottom section. vwellbcap is the vertical scroll well bottom end cap. sicon/psicon is the Adjust Size icon. blicon is the replacement Adjust Size icon when it is not required. licon/plicon is the scroll bar left arrow. hwelllcap is the horizontal scroll well left end cap. hwelll is the horizontal scroll well left section. hbarl/phbarl is the horizontal scroll bar left end cap. hbarmid/phbarmid is the horizontal scroll bar middle section. hbarr/phbarr is the horizontal scroll bar right end cap. hwellr is the horizontal scroll well right section. hwellrcap is the horizontal scroll well right end cap. ricon/pricon is the scroll bar right arrow.
You can of course use Paint to edit these two files, but I'd recommend a recent version of ArtWorks for any serious work - it really is a great tool for creating bitmaps as well as vector art. Once you're happy with your new sprites, load them over the default set by creating an Obey file in the same directory as your doctored sprites with the following two lines:
If you double-click on this file, the Window Manager should replace its original set of graphics with your new ones. Note that it might take a few moments for this process to complete on slower machines, and you may have to force a redraw of the Desktop to actually see the changes - press F12 followed by Enter to do this.
Once you've got a set of graphics you're happy with, you can opt to use them automatically at start-up. Do this by putting your edited spritefiles in an application directory called, say, !MySkin. Then rename your Obey file to '!Boot' and place inside the application directory, along with a !Run file with the same contents. If you put !MySkin anywhere where it will be seen during the boot-up process (for example, in !Boot.Resources or preferably using the Boot Run tool in !Configure), then your shiny new sprites will be used every time you start the Desktop. Once again, be aware that switching sets over, for instance on a mode change, can take a bit of time on older machines - there are a lot of sprites to get through.
Difficulties and annoyances
To illustrate what you can do, in true Blue Peter style, below is a link to a set I made earlier called 'Chrome'. This is not a complete replacement of the standard icon sets by any means: the main changes are to the window tools, background textures and some gadgets. The sprites are mostly high-colour, so they may not work on all OS versions although they've been tested on Select 3 and RISC OS 5. The screenshot below illustrates the changes made: the window tools are graduated, the background textures are more subdued, the radio and option gadgets look different.
Easier on the eyes
However, you'll also notice some idiosyncrasies. The most glaring is that the Chrome sprites and textures are a blue-grey colour, while the action buttons, frames and other gadgets drawn directly by the OS are still in the drab uniform grey we were trying to replace. On RISC OS 5 and non-Select RISC OS 4, there's nothing you can do about this: there's no option to replace the colours used universally by the Desktop to draw its gadgets. On recent versions of Select, things are bit better: you can specify colours for the 'slabbed' buttons (R5 and R6 border types) and for frames (R4), also adding a graduated effect and rounded edges if you wish. These settings are controlled from the global Configure application, and this screenshot shows what you can do with a bit of fiddling:
Action buttons falling in line with the desktop theme
This looks a lot better, but there's still some rogue grey around. On Select 3i3, which is the version I have, sunken fields (R2 type borders) and slabbed areas (R1 type borders) seem to be exempt from this colour alteration facility. My guess is that, as these gadgets are commonly used for displaying user-defined colour fields, allowing their backgrounds to be set to a global colour value would prevent some colour selection dialogue boxes from working. If true, it seems a bit odd to me - I outline a potential workaround below.
To add to this problem of non-user-definable gadget colours, there's the issue of input focus. In the first screenshot you'll notice that the middle window has the input focus. In fact, it does so in the subsequent shots too; only, in these instances, the focus effect is invisible. This is because of a curious bodge Acorn adopted when replacing the RISC OS 2 window furniture with the RISC OS 3 set: instead of the Desktop replacing the standard titlebar sprites with a different set when a window gains the input focus, current versions of the OS merely change the underlying colour of the titlebar from light-grey to cream.
|Suggested Select icon settings to use with Chris's sprites
- Rounded button edges, group edges, sounded writeable icons, and rounded information fields switched off.
- Special colour schemes enabled, special colours as a tint switched off.
- Action button colour: red 86.7% green 86.7% blue 100.0%
- Default button colour: red 73.3% green 73.3% blue 100.0%
- Groups colour: red 60.0% green 60.0% blue 60.0%
- Black text and rim colour
- Blend applied to button icons, blend applied to information fields, rim applied to button icons (optional), thin borders switched off, apply colours to sprite icons switched off, draw groupings as outlines switch on.
This shows up on the Acorn-era window furniture because the default sprites have transparent pixels which let the colour underneath show. Of course, there's nothing to stop your replacement set having similar transparent patches. However, this will only work if your carefully-chosen new colour scheme looks good with light-grey and cream areas in the title bar. I don't think it works with my changes, so I've reluctantly opted to lose the visible input focus in my new scheme. Which is a bit of a pain, as now I can't see at a glance which windows are trapping keypresses. Again, this could easily be addressed - see below.
And one final moan: even with the Select improvements, actually putting together a coherent replacement theme for the Desktop is a real pain. There's no way to save different colour settings from Configure and swap between them unless you dig out the settings file from within !Boot. At present, anyone with Select wishing to replicate the Chrome theme would have to manually fiddle with the colour values for the gadgets from !Configure to get the same results. What would be ideal is a single Configure plugin which would bring together all the various configurable display elements we've been discussing, plus related features such as the Desktop font and the Pinboard, allowing all these settings to be saved in a single 'theme' file. Such files could then be posted on the Internet and exchanged, allowing creative types to significantly improve RISC OS's appearance - and perhaps, even slightly, its perception in the outside world.
As it happens, there is an excellent third-party theme manager application available, originally developed by Richard Goodwin. This appears as a Configure plugin, and brings together a variety of aspects of the desktop appearance including sounds. Regrettably, the current version doesn't seem to work on Select, and as yet doesn't offer support for extra features such as button shading. With any luck, this situation might change. However, one might think that such functionality ought to be provided by the OS: ROL or Castle could do worse than investigating bringing Richard's theme manager or a similar application into future releases of RISC OS.
Some suggestions to our OS developers
Enough gripes - what about some positive suggestions? Drawing on the above, my wish-list of key improvements would be as follows:
- Create new toolsprites types for window titlebars for use with the input focus, and get the OS to switch between these automatically when the focus is gained or lost.
- (RISC OS 5) Allow gadgets with 3D borders to have their colours redefined. This would not have to be as elaborate as Select's implementation: just setting global values for 3D Highlight, 3D Face, 3D Shade, 3D Gutter (Default buttons) and 3D Frame Shade (for R4 borders) would enable the RISC OS gadgets to fit seamlessly with even radical departures from the original grey colour scheme.
- (Select) Allow all desktop gadgets, including slabbed areas (R1) and sunken fields (R2) to have their face set to a global colour value. To avoid corrupting colour selection dialogue boxes, perhaps one could adopt the rule that R2 fields will have their colour set to the global value unless the 'C' option in the validation string is set (indicating it's probably being set to a non-standard colour) or the icon's colour flags are anything other than Wimp Colour 1. This would alleviate the worst of the (mild) problems, and allow developers to easily avoid clashes when designing their templates.
- Review the design of the Configure applications which deal with the Desktop's visual appearance to bring together all the relevant sections more rationally, and allow the settings to be saved into a file. Perhaps take a leaf from the very sensible way Windows does it, shock horror.
There are no doubt other changes that could be made which would further enable comprehensive skinning of RISC OS, but in my view these are the most important, and would be quick wins. Let's see if anything comes of it. In the meantime, however, I hope that this article is helpful for anyone wishing to fiddle with the settings as they are, and that it prompts some more creative themes to lift RISC OS from the 1990s and into the present.
Two articles about RISC OS made it through to the finals in the OSNews feature writing competition. Chris Wraight and Gavin Wraith both won one year subscriptions as prizes.
Update at 21:19 9/10/2006
Chris has provided a new set of sprites that will work for Iyonix users. Download the complete set from the link below.
Download Chris's toolsprites and iconsprites
Previous: RISC OS Open needs your help
Next: R-Comp Dad suffers 'major' heart attack
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
Internationalising RISC OS
Unicode, i18n and more explained
30 comments, latest by caliston2 on 16/7/03 8:57PM. Published: 10 Jul 2003
Developers divided over RISC OS 4 code checking
ABC users get surprised [Updated]
26 comments, latest by adh1003 on 7/6/06 9:32AM. Published: 4 Jun 2006
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •