Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: kugel. on August 16, 2009, 06:46:02 PM

Title: Custom UI Viewport
Post by: kugel. on August 16, 2009, 06:46:02 PM
So, I just committed FS#8799 which adds the UI viewport. With this, you can make nice themes like this:
(http://www.alice-dsl.net/simonemartitz/asdf/custom_list.png)

I.e.: Put a (invisible) viewport border around lists and stuff.

We possible want to use that feature not only for pretty themes, but also to have some sort of background wps updating (but later, if at all).

How to use?

You add the lines to your themes.cfg, there's no setting for it in any menu.
ui viewport: X, Y, [width], [height], [font], [foreground pattern], [background pattern] (the patterns are dependant on the depth of your display.
The same for the remote, just that it's "remote ui viewport: ..."

width through background pattern might be omitted, X and Y not. Omit them by inserting a "-".

As you can see, nearly the same syntax as for WPS viewports, the way the optional values is also the same. In fact, it's the same except for the comma separator!

An example: "ui viewport: 15,15,100,150,1,-,-". That will give you a ui viewport starting at 15|15, 100px wide, 150px high, using the user font and using the colors from the global settings.

Happy theming!

PS: You might want to report bugs here if you find some (but our flyspray tracker is still preferred).

PS2: If you have themes that do not have the above lines in are going to look weird if you have a theme with ui viewport before (the viewport isn't reset). You then need to add "ui viewport: -" and "remote ui viewport: -" (without the quotes) to the thems to have them resetting the viewport properly.
Title: Re: Custom UI Viewport
Post by: Thecoolgman on August 16, 2009, 07:44:09 PM
 ;D Happy Day! I've been waiting for this!
Title: Re: Custom UI Viewport
Post by: BdN3504 on August 17, 2009, 08:23:59 AM
manual entry for this will take some time. i'd like to get viewports in first, so i can reference them properly.
Title: Re: Custom UI Viewport
Post by: kugel. on August 18, 2009, 03:57:28 PM
Just to show off a bit, this is what we actually would like to do with the custom ui viewport (try to ignore the anti-aliased font :p )
(http://www.alice-dsl.net/simonemartitz/cabbie_custom_sb_aad.png)
Title: Re: Custom UI Viewport
Post by: Thecoolgman on August 19, 2009, 12:37:29 AM
What are all the commands for custom ui?
Title: Re: Custom UI Viewport
Post by: Multiplex on August 19, 2009, 09:14:54 AM
What are all the commands for custom ui?
http://forums.rockbox.org/index.php?topic=22495.msg154730#msg154730
Title: Re: Custom UI Viewport
Post by: happybear on August 20, 2009, 11:03:35 PM
I've tried it out ...looks great together with the ability to adjust scrollbar width (r22416)  ;D

Noticed that after I copy files from internal memory to microSD card on my sansa e270, the screen refreshes only the specifed viewport area

eg: ui viewport: 4,22,167,183,1,-,-

so parts of the copying progress bar etc still remains on screen. Does it have anything to do with my settings?
Title: Re: Custom UI Viewport
Post by: kugel. on August 21, 2009, 06:53:05 AM
I've tried it out ...looks great together with the ability to adjust scrollbar width (r22416)  ;D

Noticed that after I copy files from internal memory to microSD card on my sansa e270, the screen refreshes only the specifed viewport area

eg: ui viewport: 4,22,167,183,1,-,-

so parts of the copying progress bar etc still remains on screen. Does it have anything to do with my settings?
That's a bug, there are probably a few more places where this happens. I'll have a look.
Title: Re: Custom UI Viewport
Post by: BdN3504 on August 22, 2009, 04:54:21 AM
Viewports for the manual are ready(FS#10553). Think i'll be done with this part for the manual in a week at worst.
Title: Re: Custom UI Viewport
Post by: kugel. on August 23, 2009, 11:07:33 AM

so parts of the copying progress bar etc still remains on screen. Does it have anything to do with my settings?

Fixed in SVN.
Title: Re: Custom UI Viewport
Post by: epithetless on August 23, 2009, 01:14:37 PM
kugel, similar behavior happens when you change the Status Bar between the "Off", "Top", and "Bottom" settings -- status bars remain on both the top and bottom of the screen (regardless of which option you finished with) until you enter the WPS.
Title: Re: Custom UI Viewport
Post by: kugel. on August 23, 2009, 05:22:30 PM
kugel, similar behavior happens when you change the Status Bar between the "Off", "Top", and "Bottom" settings -- status bars remain on both the top and bottom of the screen (regardless of which option you finished with) until you enter the WPS.

Heh, I'm not really using that statusbar anymore :P I'm working on this:
(http://www.alice-dsl.net/simonemartitz/sb.png)

But I'll definitely have a look.
Title: Re: Custom UI Viewport
Post by: epithetless on August 23, 2009, 06:00:43 PM
Well, best of luck with the status bar updates! Your version certainly looks more appealing!

By the way, what font are you using in the version of "Slick - Let It Blue" you pictured above?
Title: Re: Custom UI Viewport
Post by: ZincAlloy on August 23, 2009, 06:44:24 PM
12-Adobe-Helvetica. It comes with this one since Kugel updated it to use a Custom UI Viewport.
Title: Re: Custom UI Viewport
Post by: epithetless on August 23, 2009, 07:27:06 PM
12-Adobe-Helvetica. It comes with this one since Kugel updated it to use a Custom UI Viewport.
Thanks, ZincAlloy.
Title: Re: Custom UI Viewport
Post by: BdN3504 on August 27, 2009, 06:30:24 PM
check dis out! (http://www.rockbox.org/tracker/task/10553?getfile=20368)
Title: Re: Custom UI Viewport
Post by: evilnick on August 28, 2009, 10:18:58 AM
This is probably going to sound horribly nit-picky, but exactly how can the H100 screen show a "bright, flashing warning"?
Title: Re: Custom UI Viewport
Post by: BdN3504 on August 28, 2009, 01:33:36 PM
well it's not black, but it also isn't white, so it's bright... you come up with a better phrasing and i'll implement it ASAP.
Title: Re: Custom UI Viewport
Post by: evilnick on August 29, 2009, 06:18:10 AM
Just take out the word "bright". As it isn't bright, it's grey.

Title: Re: Custom UI Viewport
Post by: BdN3504 on September 09, 2009, 01:52:30 PM
Manual is ready.

http://www.rockbox.org/tracker/task/10553

http://www.rockbox.org/tracker/task/10553?getfile=20497

When will you commit?
Title: Re: Custom UI Viewport
Post by: spike66 on February 20, 2010, 01:34:25 AM
I knew I'd seen this post a while ago, perhaps an old subject for many, not for me since I only don't really update my Rockbox so often (it works so good for me that I don't usually feel I need to), and only got the new ui interface feature a few days ago with stable version 3.5

I've been normally rather apathetic towards “eyecandy” developments (don't get me wrong, I think they're great, just usually not so much for me), and was particularly skeptic about  the custom ui interface making a big difference. But now that I've actually “felt it”, I've got to say it's really impressing. And quite fun too ;) I'm using the arboxwidgets theme, now browsing through the menus is so different! I mean, everything’s nice and all, but additionally, the widgets do actually change just while browsing the settings options… like some sort of animated menus… awesome!

Thanks for this development  and all the others that make Rockbox so great.
Title: Re: Custom UI Viewport
Post by: iPodFoo on February 21, 2010, 09:33:04 AM
I have a theme that uses the ui viewports, but debian gives me an error when loading it if the statusbar option is off in the cfg file.

So basically, Debian returns:

Code: [Select]
ERROR: set_viewport out of bounds: x: 0 y: 0 width: 438 height:1
Also, everytime I load the theme, the height value in the error increments by 1.

The error happens when the following is true in the cfg file:

Code: [Select]
statusbar: off
It looks fine in the sim and doesnt seg fault unless I keep loading it.

If I set the statusbar to on, top or bottom, no error shows up.

Is this a bug?

Details:
svn version: 24755
nano 1g
vmware debian

Edit: Figured it out. Supposed to be
Code: [Select]
statusbar: customin the cfg.
Title: Re: Custom UI Viewport
Post by: AlexP on February 22, 2010, 05:36:38 AM
By Debian do you mean the sim?  Debian is just an operating system.

Edit:  I missed that you had solved it.
Title: Re: Custom UI Viewport
Post by: iPodFoo on February 23, 2010, 07:24:30 AM
Quote
By Debian do you mean the sim?
Yes, sorry the sim!

I found another problem though. Most plugins dont work if use the ui viewport in the cfg. On the nano it balks saying...

Code: [Select]
Data Abort at 01F823C8 (0)
... whenever I try running a plugin like the clock. On the sim it seems to be ok if the statusbar is set to custom with the ui viewport, but will hang if set to off.