dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: the UI viewport logic.. someone please help my understanding?

Re: the UI viewport logic.. someone please help my understanding?

From: Thomas Martitz <>
Date: Wed, 28 Oct 2009 18:00:14 +0100

Jonathan Gordon schrieb:
> 2009/10/28 Thomas Martitz <>:
>> You're mixing up UI vp and %Vi. They have different intentions and have a
>> different meaning.
> They do the exact same thing... but in 2 incompatable ways!

No...they're doing different things in not-always compatible ways.
>> - UI vp is the ultimate viewport for the UI excluding skins (plugins
>> override use it currently, but I'm planning to fix that). It's the viewport
>> that has the top priority for the UI. That's what it has been committed for.
>> It's described in the manual as such, and is a user setting. Skins are
>> excluded since they can be customized separately.
>> It's what you get by calling viewport_set_defaults().
> Then %Vi shouldnt be there.

Why? I just try to show you that UI vp and %Vi are different things.
Having UI vp does not mean that %Vi ought to be removed.

>> - %Vi is just the "viewport that doesn't interfere with the status bar. That
>> doesn't imply anything priority other than it's useful to respect that
>> viewport if screens that don't specify a viewport (i.e. don't use the UI vp
>> OR every screen if no UI vp is set). It's by no means a general purpose UI
>> vp.
>> It's described on CustomWPS as such, and is what you get by
>> viewport_set_fullscreen(), the function that gave always gave you the
>> maximum viewport dimensions minus status bar area.
>> Additionally, %Vi is a property of the sbs. It's completely theme
>> independent, it's just and only that very viewport that does not interfere
>> with the sbs. That's the intention, changing it to get a UI vp renders that
>> purpose obsolete.
> Then its unnecessary and should be removed.

It's not. %Vi is specifically for themes that have no UI vp AND the WPS
(remember that the WPS default vp shouldn't overlap with the sbs).

>> No screen which can be customized by the user using viewports guarantees
>> that it doesn't draws over the sbs. Neither the WPS does not do that (you
>> can easily draw into status bar area with specifying viewports), nor the UI
>> vp enabled lists if a UI vp is set. Actually, even without sbs you are able
>> to draw over the classic statusbar with the UI vp. That's because a user
>> setting is ought to be respected.
>> Therefore, %Vi is just the backup for themes/WPSes that (intentionally) omit
>> custom viewports. It is not meant to override any other *user specified*
>> viewports.
> This is also why its silly to assume a skin would work without its
> .cfg... even by your own admission you can break a wps by using a
> different font. We should get rid of the skin browsers and only allow
> skins to be loaded with .cfg's thereby closing the whole argument.

It's not silly, fine themes can take that into account (to a certain
degree). Anyway, I'm not going to agree to reduce the degree of freedom
Rockbox has now w.r.t to themability.

>> PS: I can agree to fixing the UI vp against the %Vi boundaries since that's
>> doable quite easily. It's not easily doable for WPSes though.
> 1) Then whats the point of both? 2) oh goody more exceptional codepath handling

Well, then we don't do it. I don't care because what we have currently
is what I have intended.

>> And again, UI vp is a separate feature. UI vp and sbs shouldn't be mixed up.
>> UI vp is a feature to define custom list dimensions (and that's what it
>> really should do). And the sbs is a feature to draw some nice graphics next
>> to the menu.
> They do the same thing in 2 different and incompatable ways... they
> are the same feature, and they force you to add bad code to handle too
> many different situations.

Which bad code? Again, they're different things (I'm tired of repeating

>>> * %we in the would force the sbs enabled, and if one isnt loaded, then
>>> it would use the "ui viewport" setting.
>> That adds even more confusion. %we already forces the status bar. Currently
>> the default value of status bar is "status bar at top".
>> Also, the UI vp is *not* meant to be used in skins. See my first sentence.
>> It's the viewport for everything _but_ skins.
> confusing? I summed up the logic in 1 sentence... That same logic
> applies *Everywhere*...

I don't see what %we has to do with this discussion anyway. I'm confused
because %we and UI vp are completely unrelated.

>> UI/lists are meant to be drawn fullscreen (excluding status bar area) or
>> within the UI vp, since a while already.
> "since a while already" is only because thats how it was implemented
> and commited less than 2 weeks ago... that doenst make it perfect.

UI vp was committed several month ago, not 2 weeks.

>> Again, that breaks the intention of %Vi. It is supposed to *never* change
>> unless the sbs itself is changed (redesigned for example). %Vi is a property
>> of the sbs, and not of a theme.
>> On can fix the UI vp setting just as easily as %Vi, with the bonus that it
>> doesn't what it's meant for.
> Fine, then it should be removed because it in actual fact does nothing.

It does not nothing. I wonder if you already live in a world where all
themes have UI vp and sbs. In fact, the vast majority have neither. And
there are themes that have only have a UI vp, and themes that only have
a sbs, and themes that have both. That's because they're unrelated features.

Best regards.
Received on 2009-10-28

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy