Iconbar Sprite Enhancement
Pages: 1 2
Alan Robertson (52) 420 posts |
At the moment the Iconbar uses the same sprite as the filer windows rather than it’s own. Although it has served us very well for many years, it would make for a more visually impressive Desktop if the Iconbar could have it’s own sprite. It would probably have to be similar to Titlebar’s implementation where it would have multiple sprites (left, right, upper & lower) And this would allow for various sizes of iconbars. Would there be a lot of work to achieve this? or as code for plotting titlebars sprites already, or simply reusing what we already have an pointing to a different sprite pointer? |
Rick Murray (539) 13850 posts |
I think it is more that the icon bar and the filer are using the application’s app sprite. ;-) I am not volunteering, however I had wondered about the feasibility of a half-height iconbar1 to give a little more screen space (especially on lower resolution devices such as the Pi’s composite video) – there is already in many places a suitable sprite in the “sm!appname” sprite. This will mean, as a side effect, that pretty much every iconbar menu will appear to ‘float’ as opening menus is the responsibility of the app and they open at a specific preset y-pos for iconbar menus. This could perhaps be corrected by hacking the wimp to say “if iconbar = small and menu-y = blah, then menu-y = meh” but I’m not sure I like the idea of messing with stuff in that way. Don’t even think about the messing around that would be needed to deal with placement of menus if the iconbar is anywhere other than the bottom of the screen – in there lies insanity. 1 With a basic on-screen clock as a part of the iconbar itself (not an additional app), like Windows, like Ubuntu, like… |
Steve Pampling (1551) 8172 posts |
The first thing I thought about was the possibly not so minor detail that application icons are a specific size and with an iconbar that isn’t a matching height icons could look like christmas cards on a rail1 unless a scaling method is used, but yeah ‘float’ is probably a reasonable description. 1 This might be a positive thing for some users |
Steve Pampling (1551) 8172 posts |
Clock, CPU temperature … ? |
Sprow (202) 1158 posts |
None whatsoever – you can already do it today. The iconbar is just another window which the Wimp loads it from a templates file held in “WindowManager:Templates”. The tiling is based on the workarea background colour, which by convention is colour 1, and the tile sprite for that is called tile_1 in the Wimp pool. So, somewhere prior to entering the desktop just prefix the WindowManager$Path with some chosen directory, and place a copy of the Templates there. Use your favourite template editor to set the background colour of the ‘iconbar’ template to be some unlikely colour like 8 (deep blue). Make a sprite file with a tile in it called tile_8 and ICONSPRITES that file. Here’s a merge-with-boot demo to illustrate. |
Chris Mahoney (1684) 2165 posts |
Although apps can position the menus themselves, they don’t have to (I never have in any of my apps; I’ve just let the Toolbox handle it). Does anyone know roughly what proportion of apps use the Toolbox? If it’s a majority (and I really have no idea; I’m still pretty new to RISC OS) then it may be worthwhile to update the Toolbox to handle the smaller size, rather than hacking around in the Wimp directly. |
Steve Pampling (1551) 8172 posts |
Assuming the person testing the ideas has a copy of the DDE, downloads a suitable source archive, sets up Builder, then edits the Templates file in one of the Themes .castle.riscos.sources.desktop.wimp.resources.uk.Sovereign for example, then the altered bits are in the ROM you build are they not? |
Rick Murray (539) 13850 posts |
Uh… You do realise that the only reason you don’t is because the Toolbox does (it for you)? It is really not so different (from outside) to using a library like DeskLib, only it is a module interface instead of something linked directly into your program. The Wimp would still need to be hacked in order to cater for everything that does not use the Toolbox. |
Rick Murray (539) 13850 posts |
In a word, no. I think that method used to work, back in the RISC OS 3.10 days. However, I just copied all of the Wimp stuff from Resources:$.Resources.Wimp to SDFS as $.Resources.Wimp, and set WindowManager$Path to point to it. I can’t seem to unplug BootFX (reboot and it is back again). However, if I poke in a call to RMKill it, the desktop init fails with an Abort on data transfer at &FC1473B0 – which is in MessageTrans (an LDRCCB). |
Steve Fryatt (216) 2105 posts |
Yes, but unlike Desklib, we have more control over the Toolbox as it’s shipped in the OS and isn’t a statically linked library. “Fixing” the Toolbox would “fix” every Toolbox app on the system; “fixing” Desklib would still need every Desklib app to be recompiled from source.
That’s the more fundamental problem, yes… :-) ETA: Oh, and the fact that once a non-Toolbox app has been “fixed”, it won’t work on any other version of RISC OS unless the same API is made available over there or there’s a clean way to fall back to doing the old calculations. |
GavinWraith (26) 1563 posts |
For those who do need to save screen space may I recommend my dinky theme for NetSurf? Available at http://www.netsurf-browser.org/downloads/themes/ I know that things like window-furniture, colours and icon-design seem like frivolities. But, amortized over the time one spends using the desktop, I reckon that getting the details right for one’s own comfort is a good investment. |
Rick Murray (539) 13850 posts |
Which is exactly why I mentioned hacking the Wimp. After all, if we are modifying a fundamental part of the Wimp to a behaviour different to that documented and implemented for a quarter century or so, the most options are:
Or:
|
Chris Mahoney (1684) 2165 posts |
Thanks; that’s exactly the point that I was trying to make :) Unfortunately I forgot to say in my earlier post that I am indeed aware that fixing the Toolbox won’t help with apps that don’t use it. |
Chris Hall (132) 3559 posts |
At the moment the Iconbar uses the same sprite as the filer windows rather than its own. Not true. Actually the filer window uses the Sprite defined within the application that has the same name as the application (or a default ‘application’ icon if none exists) and the icon bar icon is whatever the application chooses to plot there. The fact that most applications choose to plot the same sprite on the icon bar is a choice they have made. |
Steve Pampling (1551) 8172 posts |
I think you’re talking about application sprites ON the iconbar. If you look in the source files in path section I quoted earlier you will see the Templates file and sprites that do the work |
WPB (1391) 352 posts |
At the moment the Iconbar uses the same sprite as the filer windows rather than its own. I think Alan was referring to the window background sprite, not the application sprites that might sit on the Iconbar. Rick raises a fundamental point, that the position to open iconbar menus is a hard-coded value. It really ought to be something the Wimp tells (or at least suggests to) applications, not the other way around. In terms of hacking the Wimp, you could watch menu button presses: if they’re over an icon belonging to the iconbar, record the x coordinate. Then, when the next open menu call is made, if the x offset is close to the recorded x coordinate, fiddle the y coordinate to a value suitable for the size of the iconbar. |
Dave Higton (1515) 3534 posts |
Am I the only one who does not see this as an enhancement? Varying the icon bar size looks like it’s going to create a real mess because the non-Toolbox-based apps would not be aware of the new requirements. But even if you could wave a magic wand and fix all that: how would it look or function any better than it does today? |
WPB (1391) 352 posts |
I think as Rick said, it could be useful to have a smaller iconbar on very small screens. But for a lot of people, I suspect it’s just the idea of theming that’s attractive. Personally, I’m happy with it the way it is, but that doesn’t mean everyone else is. And just from an engineering POV, it’s not very pleasing the way the vertical size is hard coded at the moment! ;) |
Jeffrey Lee (213) 6048 posts |
As mentioned by both Rick and WPB, it should be possible to use a relatively clean hack within the Wimp to get the iconbar menus to open at the correct location.
It would look 50% smaller with 50% smaller icons and function the same as it does now? One of the goals, as Rick says, is to increase the amount of screen real estate available on low resolution displays. Or at least, increase the number of application icons which you can fit on the iconbar before it begins to scroll – because whether it actually gives more screen real estate for other windows depends on whether you prefer to have the iconbar always at the front or not. Of course, this discussion has mostly wandered off-topic from Alan’s original suggestion (themeable iconbar background sprite sets), which sounds like a good idea to me. |
Rick Murray (539) 13850 posts |
Well, to give you an idea, here is a slightly naff version that I made in a photo editor (dithered rescale). This shows a half-size iconbar on a 1280×1024 screen. http://heyrick.co.uk/random/pics/codingpic.jpeg Now imagine the difference it could make on a screen of this size: http://heyrick.co.uk/random/rocmos.jpeg If we’re feeling really extravagant, we could even have application icons on the icon bar “pop up” (to regular size) when the mouse lingers over them. Maybe even with a slight jiggle iOS style. Then we don’t need to fiddle menu positions. :-).:-) :-) |
Colin (478) 2433 posts |
You’ve convinced me that the current icon size is better in both situations. |
Dave Higton (1515) 3534 posts |
Yes. Text plus sprite icons risk having the text become illegible because there aren’t enough pixels. |
David Feugey (2125) 2709 posts |
Simply use smApplicationIcon. Works for the filer, should works for the taskbar. |
Steve Pampling (1551) 8172 posts |
I think shortening the sentence to “themeable iconbar” should cover it. |
Steve Pampling (1551) 8172 posts |
I sometimes wonder whether we should bother with text in the iconbar icons. Consider this: If you look in $.Apps and run !Help and then hover over an iconbar icon there should be text telling you about the application that owns the icon – so why do we need text incorporated in the iconbar presentation and stealing space from the graphical aspect of the iconbar presence? While we might not want the full Help implementation active what’s wrong with a simplified implementation? |
Pages: 1 2