Commit graph

47 commits

Author SHA1 Message Date
Solomon Peachy
804a49886a statusbar: Make statusbar height equal SYSFONT_HEIGHT
And size elements horizaontally based on SYSFONT_WIDTH

Unfortunately we need 16px icons to make 16px statusbar look right
but at least it _works_ properly now.

Also: all targets currently use 8-px SYSFONT, except some hosted bootloaders

Change-Id: I0cdf97e6ef47ec49693ef79667b200595b4fe075
2020-10-26 19:52:40 +00:00
Solomon Peachy
805f531632 statusbar: explicitly #include <button.h>
This header relies on stuff that might get defined in button.h, and
was reliant upon being implicitly included.

The last thing we want is a struct to change layout underneath us!

Change-Id: If96451bc5e2219031a592ab82c56045188dbe645
2020-07-16 22:02:29 -04:00
Boris Gjenero
fdc29d0ea4 Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
2011-12-19 20:12:52 +00:00
Jonathan Gordon
a9b5f4d810 cleanup statusbar+base skin relationship...
* remove the "custom" option from the statusbar setting. if a sbs file is set then statusbar setting is ignored, no other user visible change there.
* new tag, %wi  - use to draw the inbuilt statusbar in the current viewport


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25038 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 00:29:46 +00:00
Thomas Martitz
f8edc32589 FS#10756 - Free unused init code
Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back.
Only implemented for PP and as3525 so far. More targets could be added, as well as more functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 23:20:32 +00:00
Frank Gevaerts
84a4a1d5cc statusbar_position should also return enum statusbar_values if it's a macro
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24833 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 22:05:32 +00:00
Andree Buschmann
05778b501d Fix further tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24156 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 10:50:34 +00:00
Thomas Martitz
4f0e3ecda9 Fix red - statusbar_position() is a macro.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23462 a1c6a512-1295-4272-9138-f99709370657
2009-11-01 13:36:57 +00:00
Thomas Martitz
1016ee4e80 Initial custom statusbar commit.
The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows.
The default folder for .sbs is the wps folder to reuse images used in the WPS.
As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space.
There are a few restrictions/TODOs:
*) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686)
*) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though).
*) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used).
*) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar.

Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd.

Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then.

Flyspray: FS#10566
Author: myself

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 15:28:15 +00:00
Thomas Martitz
5850207d33 Slightly change parts of the previous commit to reuse existing code, and enforce enum statusbar_values instead of just int,
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22485 a1c6a512-1295-4272-9138-f99709370657
2009-08-24 00:03:59 +00:00
Thomas Martitz
19f44a61cf Fix redraw issues when the statusbar setting was changed with an UI viewport. Now the old statusbar area is cleared upon changing the setting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22484 a1c6a512-1295-4272-9138-f99709370657
2009-08-23 23:44:31 +00:00
Maurus Cuelenaere
876db6c2fc Fix/hack checkwps + add Onda VX747/VX777 targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22451 a1c6a512-1295-4272-9138-f99709370657
2009-08-21 18:15:20 +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
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
Jonathan Gordon
701a593c5d continuation of last nights statusbar cleanup.
accept FS#9858 and FS#9859
make the rec and fm screens force the statusbar the correct way now which doesnt need extra status variables


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19904 a1c6a512-1295-4272-9138-f99709370657
2009-02-02 03:14:51 +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
Jonathan Gordon
71898e5c54 Accept FS#9480 - centralise and organise the events in the apps/ layer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
2008-10-16 10:38:03 +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
Peter D'Hoye
16b67e5812 Make sure statusbar is updated when time changes. Fixes FS #7388. Moved time variable around and added init of info struct.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13802 a1c6a512-1295-4272-9138-f99709370657
2007-07-05 23:20:58 +00:00
Nicolas Pennequin
3f95ea53b0 Make the time in the statusbar always display --:-- when the RTC isn't set
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13729 a1c6a512-1295-4272-9138-f99709370657
2007-06-28 13:51:44 +00:00
Jens Arnold
ce05addf52 Revert recording/repeat timer for now. It is useful as a feature, but didn't receive enough testing on multiple targets, and fixing it is non-trivial. Later reversal would be complicated because of .lng spreading. * The patch should probably redone in a different way, as it's huge for what it does... * Issues: (1) The repeat timer setting has NULL pointer hits. (2) The multi-int setting screen breaks with proportional fonts, and with somewhat larger fonts. (3) On some targets, all values except the leftmost one are unreachable. * Hint: The timer itself would be much simpler if it'd just store & compare ticks (497 days before it wraps).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13172 a1c6a512-1295-4272-9138-f99709370657
2007-04-15 22:16:28 +00:00
Martin Scarratt
49952325c9 Recording countdown timer and repeat timer - see FS #6297 for more details
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13165 a1c6a512-1295-4272-9138-f99709370657
2007-04-15 13:56:21 +00:00
Jens Arnold
2c7b127dd7 Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from -Wundef. No code change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 23:47:03 +00:00
Nils Wallménius
f67a95330c Make private functions 'static'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12470 a1c6a512-1295-4272-9138-f99709370657
2007-02-24 11:07:21 +00:00
Jonathan Gordon
9a6f419775 CONFIG_CHARGING
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12384 a1c6a512-1295-4272-9138-f99709370657
2007-02-18 05:32:06 +00:00
Jonathan Gordon
bd47d48c21 Do the CONFIG_LED define
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12383 a1c6a512-1295-4272-9138-f99709370657
2007-02-18 05:07:19 +00:00
Magnus Holmgren
2067fcc695 Fix most (all?) CONFIG_LED warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12370 a1c6a512-1295-4272-9138-f99709370657
2007-02-17 23:22:37 +00:00
Steve Bavin
338d94f466 FS#4770 - Add USB charging for the H300 series
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12169 a1c6a512-1295-4272-9138-f99709370657
2007-02-01 10:47:22 +00:00
Martin Scarratt
617b67e769 Display bitrate (Q value for Archos), samplerate, channels and recording format (M = MP3) in the statusbar in the recording screen. This is all new info for archos targets and I-river targets now have this info on the remote as well as the main screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10856 a1c6a512-1295-4272-9138-f99709370657
2006-09-02 17:30:30 +00:00
Jens Arnold
0dd1f8ec11 Work-in-progress rework of charging status reading & display: * Changed several charging related HAVE_* macros into one multi-value CONFIG_CHARGING. * Always use proper macros for charging states. * Battery symbol charging animation now starts from current level on all targets with charging. Two-colour animation kept for non-b&w targets. Round down fill level while charging as before, but round to nearest pixel value for discharging on all targets. * Charging anim fixed on player. * Some code cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10080 a1c6a512-1295-4272-9138-f99709370657
2006-06-06 22:23:52 +00:00
Miika Pekkarinen
451ee0b11c Charging state reporting for iriver players. Values calibrated with
1900 mAh Ionity battery; might need recalibration with the stock
battery.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9030 a1c6a512-1295-4272-9138-f99709370657
2006-03-13 16:11:30 +00:00
Jens Arnold
2993ae69b5 Simplified and uniform volume handling: * Volume setting in dB on all targets, within the 'natural' range defined by the respective DAC (limited to -100..+12 dB for archos Recorders and Ondios in order to avoid 4 chars being displayed in the status bar). 0 dB means line level on all targets. * No more artificial volume limiting for Iriver and Player, settings always represent true values. Removed the various sound scaling options. * Bumped config version so save your settings. Also make sure to adjust the volume after loading a .cfg, then save the .cfg again, otherwise the volume will be out of range (a flaw in the .cfg loader).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8197 a1c6a512-1295-4272-9138-f99709370657
2005-12-07 23:07:07 +00:00
Dave Chapman
8c800cf59a Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC defines from config-*.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
2005-12-04 15:23:47 +00:00
Jens Arnold
548755adf1 Fixed disk icon display in remote status bar on iriver. * Rolled back led.c changes, introducing a changed #if condition only. Reduces code size on targets with real controllable LED.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8059 a1c6a512-1295-4272-9138-f99709370657
2005-11-24 00:10:14 +00:00
Kevin Ferrare
f57d0220dd Adapted and commited Markus Kaufhold's remote hold icon on statusbar patch for iriver ; generic logo handler (now it's possible to have a different USB logo on main screen and on remote), made the quickscreen behave as it was before
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8044 a1c6a512-1295-4272-9138-f99709370657
2005-11-22 21:55:05 +00:00
Kevin Ferrare
74b6af93b1 Added multi-screen support for quickscreen (mostly rewritten from scratch) and USB screen ; just looking at the hour makes me think it could be buggy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8039 a1c6a512-1295-4272-9138-f99709370657
2005-11-22 03:38:07 +00:00
Jens Arnold
bccfae0a58 Fixed crash with early USB. The USB screen already uses some of the new GUI code, so we have to init before. Fixed problem with gui_syncstatusbar_init() drawing the status bar(s) right away.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8030 a1c6a512-1295-4272-9138-f99709370657
2005-11-21 18:39:18 +00:00
Kevin Ferrare
1a1abf25f4 removed old statusbar and buttonbar code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8004 a1c6a512-1295-4272-9138-f99709370657
2005-11-20 01:02:14 +00:00
Kevin Ferrare
572b1f087c *** empty log message ***
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7720 a1c6a512-1295-4272-9138-f99709370657
2005-11-02 00:55:46 +00:00
Kevin Ferrare
db8415c99e Partial menus support on remote (only browsing is working, changing option isn't), corrected a bug in gui_list about scrollbar beeing displayed sometimes when it musn't
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7693 a1c6a512-1295-4272-9138-f99709370657
2005-10-30 22:34:51 +00:00
Kevin Ferrare
a3ed62b36f Corrected a bug on archos with buttonbar which was erased when filetree refreshed (mistake introduced in 2005/10/29 commit; Changed some copyrights in the files (I hope this time will be the good one and the last one ! )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7684 a1c6a512-1295-4272-9138-f99709370657
2005-10-30 01:24:35 +00:00
Kevin Ferrare
e75cbdd2a8 Some changes to the remote code : some one lines function turned into macros ; changed pre-increment to post-increment since it's clearer that way ; added a data pointer to the list callback (global variables are baaaad) ; some more documentation of the API and minor cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7681 a1c6a512-1295-4272-9138-f99709370657
2005-10-29 02:33:19 +00:00
Kevin Ferrare
d452d26885 Changed some fn names, also corrected a bug with fonts and made the filetree work like the original one (stop on reaching list limits when pressing button)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7679 a1c6a512-1295-4272-9138-f99709370657
2005-10-28 23:52:49 +00:00
Linus Nielsen Feltzing
7d6b987892 Fixed Ondio and V2/FM compiling problems from the multiscreen patch
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7669 a1c6a512-1295-4272-9138-f99709370657
2005-10-28 00:52:19 +00:00
Linus Nielsen Feltzing
7da9477bc3 Initial multi screen support by Kévin Ferrare (Patch #1318081)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7666 a1c6a512-1295-4272-9138-f99709370657
2005-10-28 00:00:00 +00:00