Commit graph

39 commits

Author SHA1 Message Date
Thomas Martitz
c0f1c49178 Get rid of some of the code duplication from checkwps, it still duplicates a lot though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22695 a1c6a512-1295-4272-9138-f99709370657
2009-09-13 13:40:58 +00:00
Thomas Martitz
32340186c7 Fix viewport_set_defaults giving the wrong dimensions if the ui vp is overridden (as done in plugins atm), and notify other code if the ui vp was overridden.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22657 a1c6a512-1295-4272-9138-f99709370657
2009-09-07 21:52:12 +00:00
Thomas Martitz
2eb1cb6f82 Fix buttonbar handling/theme changed handling in lists.
The lists need to copy to a local parent if a list passes NULL as parent in the init. This was before the commit of custom ui vp, but I removed it since I (wrongly) thought using the ui vp as parent would be fine. Let the viewportmanager fire a event in case when a theme-related setting changed and simply the handling in the lists code.
However the buttonbar handling didn't work before anyway, since list code didn't know if the buttonbar was active (it asked a variable which was always false....).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22651 a1c6a512-1295-4272-9138-f99709370657
2009-09-07 17:37:06 +00:00
Thomas Martitz
c17037a802 Factor out/generalise the function that checks whether a point is within a viewport to, and use it in the wps' touchregion code. This corrects the check that was done there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22638 a1c6a512-1295-4272-9138-f99709370657
2009-09-05 23:57:09 +00:00
Thomas Martitz
dd5789b9b9 Respect UI viewport per screen in viewport_set_defaults() also.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22539 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 16:36:40 +00:00
Thomas Martitz
90a29dd611 Make UI viewport handling more multiscreen aware and bring a break; accidentally back lost in a previous commit (r22485).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22537 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 15:46:32 +00:00
Thomas Martitz
4c48b59be8 User definable UI viewport, to be able to restrict the UI into a viewport for all bitmap displays.
Flyspray: FS#8799

This will allow for pretty themes, for example those with nice glass effects on their backdrops (some might argue they're wasting screen space but it's upto them),
as well as allowing for future background WPS updates in the main UI.

Plugins are not converted yet, they simply use the full screen. Ideally, any plugin that does *not* want the UI viewport, should take care of that itself (i.e. plugins should normally use the UI viewport).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22365 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 22:20:11 +00:00
Alexander Levin
3bfc0e7a7e Remove unneeded symbols and improve the comment to the VP parsing function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22266 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 13:37:07 +00:00
Thomas Martitz
e4bdc08d0c Fix FS#10505 - "Background changes to inverted when cleared" as well as a problem that lets the viewport parser reject correct WPSes, both introduced by r22222
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22264 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 13:04:12 +00:00
Thomas Martitz
a1b0e165cc Don't set the drawmode twice and simplify two cases in viewport_parse_viewport.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22227 a1c6a512-1295-4272-9138-f99709370657
2009-08-09 18:44:49 +00:00
Thomas Martitz
f909428321 Fix the yellows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22225 a1c6a512-1295-4272-9138-f99709370657
2009-08-09 17:47:12 +00:00
Thomas Martitz
9f3fc27be4 Fix player and greyscale reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22224 a1c6a512-1295-4272-9138-f99709370657
2009-08-09 17:39:39 +00:00
Thomas Martitz
9bd7b23e99 Factor out WPS' %V parsing function into viewport.c, in preperation of customlist. No functional change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22222 a1c6a512-1295-4272-9138-f99709370657
2009-08-09 16:16:55 +00:00
Jonathan Gordon
a06f6eedae cleanup the remote+main statusbar handling a bit, and fix the bug where the remote wps might reserve the space for the statusbar even if its disabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21709 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 00:51:03 +00:00
Jonathan Gordon
5931c2a82a fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21668 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 18:30:00 +00:00
Jonathan Gordon
f1034e00f6 FS#10406 - split the statusbar setting into one for each display, and allow the bar to be at the top or bottom of the display
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21665 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 18:07:58 +00:00
Jens Arnold
b22e604a06 Fix the charcell viewport defaults. The statusbar is offscreen on charcell. This fixes e.g. the yesno screen when deleting files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21267 a1c6a512-1295-4272-9138-f99709370657
2009-06-12 22:22:19 +00:00
Thomas Martitz
be214c9445 Fix a problem that the statusbar was redrawn to late and not really in sync with the lists when changing loading a (theme) .cfg or changing the colors witht the color picker. Now both, the statusbar and the tree lists are redrawn instantly after settings_apply() (even before the "Theme loaded" splash).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21222 a1c6a512-1295-4272-9138-f99709370657
2009-06-08 18:19:43 +00:00
Bertrik Sikken
8d5dbf4c14 Clean up some unused #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20975 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 11:56:06 +00:00
Thomas Martitz
ad59f6ed22 Fix up statusbar drawing in the wps a bit, fixing most, if not all, (re-)draw issues.
a) remove the temporary work around in gui_wps_display
b) let the  wps-statusbars redraw if it's masked (i.e. WPS_REFRESH_ALL or WPS_REFRESH_STATUSBAR)
c) fix a bug of mine, I attached re-fixing the bars to the wrong event
d) unify the decision whether to draw bars at all
e) some other style/code minor cleanups

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20400 a1c6a512-1295-4272-9138-f99709370657
2009-03-20 16:12:09 +00:00
Thomas Martitz
680990912c Some internal rework of the wps:
a) Put duplicated code together. The restoration code into the existing restoration part of the main loop, the exiting code into a separate function
b) Let the STATUSBAR_CHANGED event handle fixing the statusbar

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20329 a1c6a512-1295-4272-9138-f99709370657
2009-03-17 01:39:20 +00:00
Jonathan Gordon
79967c7a49 Fix screens not redrawing the statusbar when they should.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20126 a1c6a512-1295-4272-9138-f99709370657
2009-02-27 08:24:39 +00:00
Jens Arnold
2088ce9117 Fix Player status'bar' broken in r19894.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20062 a1c6a512-1295-4272-9138-f99709370657
2009-02-20 15:00:34 +00:00
Jonathan Gordon
036fb05dfd Accept a quick patch from Alexander Levin to neaten up the #defines and comments from my earlier commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19897 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 13:43:08 +00:00
Jonathan Gordon
ee8c479dff this commit actually makes my previous one work when the statusbar setting is enabled but the bar has been forcibly removed from the screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19896 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 13:08:31 +00:00
Jonathan Gordon
80cb3551eb Statusbar handling fixes.
Fixes FS#9845 - %we/%wd wasnt working
WPS no longer resets the viewportmanger more than needed (was doing it twice/draw before)
screens can now enable/disable the statusbar easily ignoring the setting instead of needing special handling (fix for the radio screen coming soon)

minor glitch introduced in this commit... the statusbar in the WPS might disappear for a fraction of a second when it is entered, I need to track this down...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19894 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 11:34:16 +00:00
Jonathan Gordon
40ca3a4ccc fix the statusbar on the archos player... a more proper fix is probably to surround global_Settings.statusbar with #ifdef HAVE_LCD_BITMAP... maybe..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19753 a1c6a512-1295-4272-9138-f99709370657
2009-01-12 09:05:59 +00:00
Jonathan Gordon
8b9fdb540c redo how the statusbar updates are done. send the EVENT_GUI_ACTIONUPDATE event every time get_action() is called. The event wont be as realiable (timewise) as before, but seems to work better
This also fixes FS#9761.
Also set the lcd font back to the ui font from the debug screens which use sysfont


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19681 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 09:59:11 +00:00
Jonathan Gordon
9296126417 More SYS_FOURHERTZ handling fixes.. (FS#9740 FS#9741)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19635 a1c6a512-1295-4272-9138-f99709370657
2009-01-02 01:29:13 +00:00
Jonathan Gordon
e385ee18ce Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.
viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.)
All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false).

This commit also includes some menu/list viewport cleanups from kugel in FS#9603


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-12-31 05:59:26 +00:00
Peter D'Hoye
205f3df781 Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 20:45:21 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Jonathan Gordon
bdbdb97f19 FS#9051 - remove LCD margins... use viewports if you need them...
NOTE to WPS people....
%m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored.
Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected.

Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
2008-06-23 13:20:35 +00:00
Jonathan Gordon
daa8341a13 a bit of code cleanup.. use a single function to get the statusbar height (or lack of if its enabled), and remove some gui_textarea stuff which could be done using the splash. (gui_textarea is on the way out)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17350 a1c6a512-1295-4272-9138-f99709370657
2008-05-04 10:58:05 +00:00
Bertrik Sikken
2843469876 Moved atoi declaration to stdlib.h. Deleted atoi.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 16:18:04 +00:00
Jonathan Gordon
5ca1539969 the menu and list now accepts a parent viewport to draw in (and the menu can be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 03:35:24 +00:00
Dave Chapman
2b7d48ede0 Bugfix for new list implementation - correctly assign colours for remote LCDs (fixes wrong colours on X5 remote)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16599 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 23:53:46 +00:00
Jonathan Gordon
3f686d7034 fix recorder, buttonbar caused list problems
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16584 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 02:00:31 +00:00
Jonathan Gordon
0e5cec2d18 FS#8457 - convert the list drawing code to use viewports. This does not include any of the customizability which was in the patch, so unless any bugs show up users should not notice any difference.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16527 a1c6a512-1295-4272-9138-f99709370657
2008-03-05 09:58:30 +00:00