Rockbox

Tasklist

FS#11835 - %Lt tag does not work

Attached to Project: Rockbox
Opened by Leo Witt (some-xtc) - Friday, 24 December 2010, 15:16 GMT
Last edited by Teruaki Kawashima (teru) - Saturday, 15 January 2011, 11:45 GMT
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Operating System Olympus M:Robe 500
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Version: r28880

Hello,

the %Lt tag does not work on the m:robe500.

Tested with simulator too.
This task depends upon

Closed by  Teruaki Kawashima (teru)
Saturday, 15 January 2011, 11:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r29058.
Comment by Hayden Pearce (St.) - Saturday, 25 December 2010, 04:14 GMT
Can you please post an example of how you are using it?
I have several themes I have developed using this tag in the current build and all is well.
Attach the theme, and I'll have a look at it (or someone else will) when I get a chance.
[St.]
Comment by Leo Witt (some-xtc) - Saturday, 25 December 2010, 10:22 GMT
Hi,

my exapmle is very simple and I use this tag with a conditional, like it is described in the wiki.
Comment by Hayden Pearce (St.) - Saturday, 25 December 2010, 13:27 GMT
Well, I'm not sure what you're seeing...but I'm also unsure what you're expecting to see.
The code you have here is the same as: "If there's a List Title, display it" which coupled with the positioning you've chosen adds up to "Do absolutely nothing different at all when compared to default behaviour".
What is the effect you're trying to achieve, and what is it you're getting instead?
[St.]
Comment by Leo Witt (some-xtc) - Saturday, 25 December 2010, 15:15 GMT
I'm tying to get the effect like the terminal theme has:
http://themes.rockbox.org/index.php?themeid=1067&target=cowond2

But I get instead: nothing.

Am I wrong?
Comment by Leo Witt (some-xtc) - Saturday, 25 December 2010, 15:31 GMT
for example:

with

%?Lt<cake|cheese>

I get "cheese" (the hole time) on the m:robe

Comment by Jonathan Gordon (jdgordon) - Saturday, 25 December 2010, 23:39 GMT
of course, cheese would be displayed for every screen where there is a list title... you neeed to actrually use %Lt to get it to display the title...

e.g %?Lt<no title|%Lt>
Comment by Leo Witt (some-xtc) - Sunday, 26 December 2010, 00:14 GMT
Okay guys,

a picture is worth a thousand words:
(The following code is used on both simulator builds)

%wd

%V(0,0,320,30,1)%Vf(000000)%Vb(00eaff)
%?Lt<%Lt|cheese>


%Vi(-,10,40,300,100,1)%Vf(00eaff)%Vb(000000)


I hope, you understand my concern now.
Comment by Leo Witt (some-xtc) - Sunday, 26 December 2010, 00:24 GMT
I'm also asking me, why the [red arrow] does not disappear like on d2.

Thanks!
Comment by Hayden Pearce (St.) - Sunday, 26 December 2010, 05:13 GMT
I'm assuming you don't want the title-bar...which is what I was saying earlier, but perhaps not so clearly without spelling it out.

All you need to do (and I know it looks fucking weird but I assure you it works) is:

%?Lt<>

Loosely translated: "If there's a list title (which is always true afaik), do nothing".

If you *do* want the title bar to display, then:

%?Lt<%Lt>

Will work fine.
Comment by Teruaki Kawashima (teru) - Sunday, 26 December 2010, 07:02 GMT
this seems to fix the bug.
Comment by Leo Witt (some-xtc) - Sunday, 26 December 2010, 12:11 GMT
Hayden,

all I want is to *move* the title bar to an other position, like on the terminal theme for the d2.


Teru,

it's a pitty, but I can't build rockbox on my own...
Comment by Hayden Pearce (St.) - Monday, 27 December 2010, 07:28 GMT
Leo,

Ok, that's fine...easy.

To do this, we'll need at least two viewports...but we know this much already.
Firstly, we'll want the viewport that houses our list title-bar (lets assume the screen is 100x100px):

%V(0,0,100,20,1)%Vf(000000)%Vb(FFFFFF)
%ac%?Lt<%Lt>

Then, we want the rest of it to be the UI viewport, and we don't want either to overlap so:

%Vi(-,0,20,100,80,1)%Vf(FFFFFF)%Vb(000000)

It gets more interesting if you want to display the list title-bar icon, but you haven't yet mentioned wanting to do so,
so I'll leave that for now.

This works as expected on my end.

Teru,

What does your patch actually fix? As far as I'm concerned, it is working fine.

Just some confusion as to how the tag should be used I think.

When %?Lt condition is used, the list title-bar is not drawn in the UI viewport.
-To display the title-bar elsewhere, another viewport is defined and "%?Lt<%Lt>" is used.
-To remove the title-bar from display in the UI viewport, you can do "%?Lt<>" (if there's a title, do nothing).

I never find the need for a "false" case in the %?Lt condition, as I don't think it would ever be true.
I'm pretty sure that all screens have a list title, no?
Comment by Leo Witt (some-xtc) - Monday, 27 December 2010, 11:57 GMT
Hayden,

thanks for your help, but do you already tested this with mr500-sim ?

Check it, and you will see ;-)

This is obviously a bug and not a wrong usage of the tag.
Comment by Teruaki Kawashima (teru) - Monday, 27 December 2010, 12:38 GMT
The patch fixes that %Lt tag doesn't work on targets which have more than 1 screen.
almost all screens using list seems to have title but there are screens not using list. those do not have list titles and the "false" case might be used in such case. e.g. quick screen.
Comment by Hayden Pearce (St.) - Wednesday, 29 December 2010, 13:04 GMT
Leo,

Can you actually post the code you're using please?

[St.]

Loading...