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: Jonathan Gordon <>
Date: Wed, 28 Oct 2009 09:32:20 -0700

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!

> - 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.

> - %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.

> 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.

> 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

> 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.

> That breaks the purpose of UI vp. And it breaks the purpse of %Vi. And it
> doesn't add any consistency. In contrary, loading a sbs from a UI vp enabled
> theme will magically change the list's viewport radically. The same goes for
> simply toggling between sbs and classic status bar. I don't see any
> consistency here.
> Changing list layout because of a totally separate, even unrelated feature,
> is highly inconsistent.

If it is indeed unrelated then %Vi was a very bad addition and should
be removed.

> If a UI vp is set, then lists are using that. Otherwise lists are drawn so
> that they don't overlap with statusbars (both classic and sbs). That is
> totally consistent in my eyes.
> The WPS always uses %Vi for the default (implied) viewport, since you cannot
> specify that in any way.

Right there is the inconsistency! the WPS should be using the same as
the rest of the UI for the default viewport... i.e the setting.

>> * %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*...

> 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.

> 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.
Received on 2009-10-28

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