Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Settings
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by pijulius - 2006-08-29
Last edited by Llorean - 2008-01-16

FS#5899 - Custom List/Menu x/y coordinates and width

This patch adds four options to the rockbox wps settings file so you can define a custom x/y coordinate for the list/menu and even a width and a number of lines.

The seetings in the theme.cfg file should look like following:
listxpos: 47
listypos: 47
listlines: 9
listwidth: 210

(these are the settings for the jClix theme for e.g.)

This should help people to create custom wps-es and place the menus anywhere on the screen.
Bests,
Julius

Closed by  Llorean
2008-01-16 06:40
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

See task number 8457 for a viewports implementation of this being worked on, and feel free to contribute there.

Fixes:
* set correct width with icons and/or scrollbar displayed
* restore correct font face/display width when statusbar shown so scrolling text don’t get missed up
* reset settings on new theme load

I now also tried this patch :-)

But it will crash the X5 sim immediately on start :-( But using lcd_set_custom_width and lcd_get_custom_width
instead of display→set_custom_width and display→get_custom_width solved it

And if you use the setting “Line Selector” with “Pointer” instead of “Bar” the pointer is displayed at the end of the menu item instead of the beginning

Changing

cursor_pos = global_settings.listxpos/6;

in list.c solved it

Fixes & improvements:
* Fix quickscreen bugg so it is shown correctly
* Display quickscreen functions in the right place for e.g. if the menu’s/list’s x coordinate is 50px the quickscreen will start from there too and it will use the list’s/menu’s width/height to place the other functions too

Have you ever enabled “Show Path” in the File View? :-) You may notice that both the icon and the path is displayed
on the wrong location.

The icon is always on pos 0,0 and the path is part of
the scrollbar which it should not be. Compared to a wps
without listxpos and listypos

I am currently trying to fix this but maybe you are faster :-)

you need to resync

first try to adapt to new config settings code
ATTENTION: this patch depends on the multifont patches (FB 4733)
applied before at the moment

@Max, on your version of this patch I noticed that it just went out of sync with some recent changes to apps/gui/list.c. 3 hunks failed that were putting the code based around the bool use_custom_list in the scroll up, scroll down, select previous methods. I found that by just searching out int nb_lines = gui_list→display→nb_lines; in list.c (only one occurence now) and placing that code there it works. I’ve compiled it and tested it on my iPod. I would up a synced version here but with all the patches I have on my build I don’t trust myself to sync it properly and I’m unsure if what you have has any other dependencies than what is here.

Thanks. I will look into it asap

quick and dirty sync

I have a question for you Max. I’m working on the scroll-acceleration patch for the iPod at http://www.rockbox.org/tracker/task/5594 and at present I’m using a helper patch that I have posted there to add a custom list check for those that use this patch. I’m thinking about completely getting rid of that helper by calling select_at_offset instead of select_above, or select_below since that method already has a custom list check. What I’m wanting to know is if you think I should leave it as is with the helper patch since that would involve less steps or change it? (I’d have to go to the handle_accleration method, then select_at_offset, and then selece_above or below instead of handle acceleration and then straight to select above or below. I’m thinking I want to keep it with the helper patch since that’d take less processor time but there has been some confusion about the helper patch and the need to apply it so I was thinking about that slight rewrite to avoid any confusion. Thoughts?

Oh, if you can look at that, just look at the most recent patches, my earlier ones are an embarrassment.;-)

My experiences with patch users shows that having as less patches as possible is the best solution :)
You could also create a new function that does only the custom list check to menu.c
or I can add such a function to the patch if that helps. Then any custom list check
can be done also from the “outside”. Does that answer your question?

I wish I had read this first; I went ahead and rewrote it calling select at offset.:) As far as adding that function I’m all for it, I just don’t know how to check for custom list without using global_settings.listlines. I’m nowhere near as knowledgeable on custom list.

that is the only way to check
the advantage would that it is then encapsulated inside menu.c

AFAIKS you need only the correct nb_lines right?
So we should also add another function that simply returns the correct value

Yeah, that’s all I need, the reason I made that helper was because if somebody tried to compile a patch with the check included that did not use custom_list_position it would fail because global_settings wouldn’t have listlines.

thats always a problem with patches that depend on each other
you are free to add any functions to this patch if you want
cause I dont know when I will have time to do it

Thanks for your time Max, I think I will add that to menu.c on this patch so I can get scroll-acceleration back a little leaner the way I liked it.

fix line selector extending out too far in list. I only did this for lcd-16bit.c so if you need this done for other bit depths then just let me know, I just figured for the most part only people with a 16 bit depth lcd would use this anyway.

I’ve synced the patch, but when a WPS uses a custom line with scrolling, the scrolling line shows the gradient bar selector.

Oops, wrong task, you might delete my above comment (and this one). Meant to post in custom line

just a few minor adjustments.

This fixes the quickscreen not putting things within what you defined as your customlist.

Probably help if I actually attach the file ;-)

Ok guys, I’ve fixed some issues:

1) The right margin of the text is now equal at any times. It’s indepent of you using list title or not, icons or not, or which of the line selector types.
2) I’ve fixed that when you use the pointer line selector type there were some empty pixels between the icons and the text. This was caused by the though, that the line selector is right of the icons. But as it is actually left to the scrollbar, so I removed that empty spot.
3)I’ve made lists having an indent of the scrollbar width, even if there is no scrollbar. Now the icons aren’t jumping around anymore depending of the scrollbar (this only applies when not using a list title).

Works fine with the Sansa e200 sim.

Thanks

I’ve fixed a glitch, when custom line was not used, but icons and cursor line selector (the text and the icons overlapped).

TODO: I’ve noticed another glitch. In lists, which don’t use icons at all(such as the list where you select the line selector in the settings), show a glitch (cursor and text overlap) when you use cursor. I’m to busy to fix that now.

need to be resynced
Please do it

I gave it a shot, but I wasn’t able to resync this patch. It looks like there’s been some changes to a few of these files that are outside of my basic coding knowledge.

Also, from what I saw in /apps/gui/list.c (compared to what I saw in the patch file), there are some changes that I couldn’t track in the list of revisions. Maybe this is from old dependencies this patch had? Hopefully someone with greater skills than mine will come along soon and sync this guy. Now that album art has been committed, this might be the only patch I use in my build!

You need to apply the rightmargins patch (last attached file in the scrollmargins patch “thread”).

Believe it or not I really am going to dig the scroll-margins dependencies out of these patches, just been tied up with the holidays and would you believe it..jury duty!

Thanks for committing to working on this Travis!
Is there anything I can do to help get this synched any faster? Haven’t updated my build since album art was committed to svn…

Any progress on this patch, Travis? I’m a few days away from modifying my theme so I won’t need this anymore. Sorry if I’m being pushy, especially if you’re still busy.

I hate to say it, but you probably should go ahead and modify your theme. I do have a working copy of this at http://home.centurytel.net/tdtooke/patches.zip with all the dependencies you’ll need included, but since viewports is becoming a reality now it’s only a matter of time before this patch is closed altogether.

Does that mean viewports would be capable of performing the function of this patch, or that this patch is simply becoming obsolete?

I don’t get what viewports has to do with this patch. This patch doesn’t even touch the WPS, or something done by viewports. Viewports can’t rearrange the menus AFAIK, so I don’t think that this one will be closed.

The viewports patch currently in the tracker (#8385) adds viewport capabilities to the low-level LCD drivers in Rockbox, plus adds the ability to use viewports in the WPS.

So the viewports patch itself doesn’t make this patch obsolete, but it means that this feature should be reimplemented to take advantage of the viewport feature in the LCD drivers.

The intention (discussed amongst the devs on IRC a few weeks ago) is that the list widget should be implemented using a number of viewports to contain the various elements - title, icons, scrollbar, main content and cursor (if the user is using the arrow cursor). This should simplify the code, and also allow things like moving the icons to the right-side for RTL text. It should also be possible to give the list widget a custom size/position (similar to what this patch does).

Here’s a version sync’d with viewports. Not dependant of any other patch, except multifont a little. Expect this to be closed soon, as viewport will bring it’s own implementation of this features. However, my patch uses viewports quite a bit.

Oh, two notes I forget to add.

a)For compability reasons, I didn’t take out the listlines stuff yet. It could be definitely better using vp→hight/font_height or something.
b)It’s not extended to remote screens yet.

I was thinking about having the .cfg define the viewport. You could have backwards compatability since listlines is height/fontheight, you’d just have to have it convert the lines back into actual height. That way you don’t have to have all that code dealing with nb_lines and whatnot. It might be a good idea to define the viewport with the actual content in it with that, and add to the settings to define the viewports for icons and the scrollbar to minus out some of the code dealing with that. Not sure how all of that would work in actual practice though.

Now that I’m thinking about it, backwards compatibility with listlines would probably be problematic, it might be best to just go with a height setting.

Sure. My primary object with the latest patch was to sync it to viewports, so that we can use custom list features until viewports is ported to list (refering to the current discussion in  FS#8385  ). This will just get closed soon anyway.

My mistake. One would think I of all people would understand keeping this alive while we wait..:-)

Well, I laughed too early. Testing on sim isn’t enough sometimes. Real targets will crash when a line scrolls. Besides there’re issues with the line selector types. So, I wouldn’t recommend this patch yet. I will have a look tomorrow.

This version actually works. There’s just is a problem problem when a line scrolls. It simply ignores the list width.

Test on real target. I’m not sure, however I noticed bad performace of my e200. Might be other patches I’ve applied though.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing