summaryrefslogtreecommitdiffstats
path: root/apps/gui
AgeCommit message (Collapse)AuthorFilesLines
2014-01-22skin_engine/backdrops: Have to reload default backdrops from setting when it ↵Thomas Martitz2-2/+5
changed. When skins use the default backdrop (via %X(-) or no %X at all) and the setting changes it needs to be reloaded, otherwise when changing themes the new theme could show the backdrop from the previous theme. The same needs to be done when re-selecting the same theme after USB because the backdrop file was potentially overwritten. Fixes FS#12892 and FS#12942. Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
2014-01-16Fix Player warning.Thomas Martitz1-0/+1
Change-Id: I43989c92935710b36b68891a637db2e2cafb0401
2014-01-16usb screen: Crop logo to the UI viewport dimensions.Thomas Martitz1-4/+7
If the UI viewport is too small only the most top/left parts of the logo will be displayed. This goes one step further than bac85f2. Change-Id: I832b0e787e57e3b102a9c097cf1cccd7d4ad92d9
2014-01-16usb screen: Push the usb screen onto the activity stack. This enables %cs ↵Thomas Martitz1-0/+4
tag support for it. Change-Id: Icecb72007aa3aba501c702e1aa65c801fcbc3857
2014-01-15usb: Do not disable themes in the USB screen.Thomas Martitz1-21/+14
Fonts can now be assumed (by the code) to be available during USB. Make use of this fact in the USB screen and don't disable the skins. Change-Id: I525359aae16660604e8fe89addc0bdf97a3fafc1
2014-01-15skins: Update SBS when changing activities.Thomas Martitz1-3/+3
When changing activities (those that are indicated via %cs skin tag), the sbs needs to be updated, so that the UI viewport can be applied before that activity draws its UI. Fixes FS#12804. I hope this commit doesn't have bad side effects. Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
2014-01-13Always check, if the USB logo for remotes overrides their physical size.Szymon Dziok1-2/+4
This fixes displaying of the main USB screen on m:robe 100. A remote for this particular target has no native remote USB logo and it uses a larger one. However it's a good idea to perform this check always IMHO. Change-Id: I56ceb2316c551269be011b60271d8da11cb8b073
2014-01-13Implement volume limiter featurePurlingNayuki1-2/+4
Add a "volume limit" parameter to the configuration file. The maximum value of volume setting in sound menu will be limited to the same as volume limit. Also each time when setvol() is excuted, Rockbox will check if the global_settings.volume value larger than global_settings.volume_limit. If larger, take the value of volume_limit instead. The volume_limit argument shares the same maximum and minimum values with volume argument, while taking the maximum volume as its default value. Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36 Reviewed-on: http://gerrit.rockbox.org/697 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-01-12skin_engine: Stricter checking for x, y, width, height for bar tags.Thomas Martitz1-4/+17
Every theme that doesn't parse anymore now has broken values. I hope it's not too many of them. Change-Id: I6f52e55dc9197d0919f854240723a88f99c0b7da
2014-01-12put_line(): Add another check against possible buffer overflow (see 193911a).Thomas Martitz1-0/+2
Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
2014-01-12put_line(): Fix buffer overflow.Thomas Martitz1-3/+5
At the end of the format string it wrote a last byte (or inline string) past the end of the lcd boundaries, potentially overwriting unrelated memory. It now makes sure it won't exceed the viewport's width. Change-Id: Id4cfce918e8b070b7fc3c7d33f389f7a171963ff
2014-01-12skin_engine: New param "noborder" for the bar tags.Thomas Martitz5-12/+38
By specifying this param the bar will not have a border/box. Instead the inner part that fills up is maximized on the bar area. Note that this only affects bars using foreground and background colors, not those constructed with images. Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
2014-01-12put_line(): Do not lock up if the scroll engine runs out of lines.Thomas Martitz1-2/+10
Allocate MAX_LINES+1 because at the time get_line_desc() is called the scroll engine did not yet determine that it ran out of lines (because puts_scroll_func() wasn't called yet. Therefore we can run out of lines before setting the used field. By allocating one item more we can survive that point and set used to false if the scroll engine runs out of lines. Change-Id: I7a9af1bce256c6e07d254f096bd5865fa7cf2cee
2014-01-12touchscreen/skin_engine: The touchregion handler didn't handle that vertical ↵Thomas Martitz1-2/+2
bars are bottom-up by default Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
2014-01-12Fix remote warnings and charcell reds, and remove minor left-over tuff.Thomas Martitz1-8/+4
Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
2014-01-12put_line/scrolling: Make the scroll engine inform custom scrollers about ↵Thomas Martitz1-15/+34
start/stop of scrolling. With the new lcd_putsxy_scroll_func() code can register custom scroll functions (put_line() makes use of that). In order for the custom scroller to be able to properly manage its userdata pointer (set via struct scrollinfo::userdata) the scroll engine must inform the scroller about start and stop of scrolling. To inform about start the lcd_scroll_* functions now return true when the line will scroll. To inform about stop the scroll engine calls into the scroller one last time, with the text set to NULL. put_line() can use this to release the userdata registered per scrolling line so that it can be recycled. This fixes that some scrolling lines became glitchy after some time because the userdata was recycled too early. Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
2014-01-11icons: When loading mono icons keep them in mono format.Thomas Martitz1-1/+1
This enables monochrome icons them to work with the invert line selector. Change-Id: Ic3e9219e93b4879166a10180e6067446a84a62bf
2014-01-10skin engine: Fix FS#12884.Thomas Martitz3-27/+27
The %Vf and %Vb tags change the colors for the rest of the viewport. This requires the rest of the vp to be redrawn when they change due to a conditional. The previous code did this redraw in all cases (conditional or not) which led to visible blinking. Change-Id: Ie59dfc6fe8ed76485a2a2bd7caf1315f1944c227
2014-01-09skin_engine: Pass string to put_line() via $t because they can be very large.Thomas Martitz1-4/+6
Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
2014-01-09put_line(): Limit and truncate inline strings to MAX_PATH+32.Thomas Martitz2-6/+20
Because inline strings have to be copied (to escape '$') the local buffer can be exhaused. The code didn't check for this. The buffer is increased to handle filenames plus some extra chars but truncates to avoid overflow. If you have longer strings please pass them via $t tag, in which case put_line() imposes no additional length-limitation. Change-Id: I0ca20adbe72f6d44cb442f34d665c16b12cbbaeb
2014-01-09put_line: Be more careful with changing fg and bg colors.Thomas Martitz1-5/+16
put_line() needs to change fore- and background colors if required by the line style. This should really only be done if required, and be undone as to not compromise subsequent lines. This fixes %Vf and %Vb skin tags. Change-Id: I85e5a0d1d64aa9eb76a891d9ce1de1320274a69a
2014-01-07Fix Player red and icons on mono displays.Thomas Martitz1-1/+1
Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
2014-01-07Oops, pasted to the wrong place.Thomas Martitz1-1/+1
Change-Id: Icb07ddd04171699e997eca171bf8756b5fd9f024
2014-01-07Fix a few reds and yellows.Thomas Martitz2-4/+6
Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
2014-01-07lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.Thomas Martitz3-13/+3
These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
2014-01-07lcd-common: Remove direct style (line decorations) from lcd-puts* functions.Thomas Martitz2-3/+24
This logic is moved into apps (put_line()) which can better handle line decorations with respect to scrolling, mulitline and other complications. Firmware doesn't need this. The remaining drawing function know only one style, that is foreground on background/backdrop (changing drawmode is still supported). Change-Id: I707060edc388a7d723a7d09b0cf5cbda6ec56708
2014-01-07lcd-common: Remove support for custom line heights from viewport.Thomas Martitz1-4/+1
Since scrolling is now pixel-based this is not necessary anymore. custom line height is handled by put_line() but can also possible to implement with lcd_puts_scroll_func(). Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
2014-01-07skin_engine: Adapt put_line().Thomas Martitz4-65/+54
This allows for code unification and removal of a workaround (STYLE_XY_PIXELS). Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
2014-01-07lists: Adapt put_line().Thomas Martitz4-241/+153
This enables removing large portions of code, simplifiyng the drawing routine. All of the removed code is functionaltiy now available through put_line(). Change-Id: Ib8e61772134189a8c3c6d22345c0b45e912bea76
2014-01-07Introduce put_line().Thomas Martitz2-0/+466
This function is a fully-fletched, high-level pixel-based line printer, that combines functionality of several firmware and list functions. It can draw spacing, icons and text in a single call, in any order and each multiple times. It can also apply line decorations at the same time. It features printf-like semantics by accepting a format string that contain format tags as well as inline text. It's accessible directly, but also through the multi-screen api for plugins. Change-Id: I70f5a77bbf4b0252521f2e47ead377b9d6d29b54
2014-01-07icons: Provide accessors to the icon format (mono or native).Thomas Martitz2-0/+22
This is needed by the upcoming put_line() api to apply different drawmodes depending on the format. Change-Id: I626a7369a6e75c9c46af1ca5e4f1a9d401899b68
2014-01-07icons: Remove automatic left padding if x == 0.Thomas Martitz2-6/+3
Since x is viewport-relative the icon isn't necessarily placed at the physical display boundaries so that the padding isn't always useful. In fact it does more harm if one wants to place an icon exactly at 0 of a (non-default) viewport. Calling code looks still mostly fine. I've only modified list drawer to include the padding in the call-site. Change-Id: I6b16b3d4377c3553234667b79837adde10e0edf2
2014-01-07lcd-charcell: Correct get_icon_width() stub, everything is 1 char wide.Thomas Martitz1-1/+1
Change-Id: I2a76c306be8f11827cb8d1f12641d710f49274aa
2013-12-30Fix build errorJonathan Gordon1-0/+2
Change-Id: I32e06cc41c70e225622c87539feaca5f92131065
2013-12-29skin_engine: unload skin backdrops when the skins are resetJonathan Gordon1-0/+2
Hopefully this will fix various skin related bugs which happen on usb plug/unplug! Change-Id: Ie1d8378fca38dae02e42ed02a68bdb3663651b4d
2013-12-23fix some reds.Thomas Martitz1-0/+2
Change-Id: Iecb1305dbd1519434e0f476d2199e728b96091f9
2013-12-23playback,talk: Share audiobuffer via core_alloc_maximum().Thomas Martitz1-2/+0
This fixes the radioart crash that was the result of buffering.c working on a freed buffer at the same time as buflib (radioart uses buffering.c for the images). With this change the buffer is owned by buflib exclusively so this cannot happen. As a result, audio_get_buffer() doesn't exist anymore. Callers should call core_alloc_maximum() directly. This buffer needs to be protected as usual against movement if necessary (previously it was not protected at all which cased the radioart crash), To get most of it they can adjust the willingness of the talk engine to give its buffer away (at the expense of disabling voice interface) with the new talk_buffer_set_policy() function. Change-Id: I52123012208d04967876a304451d634e2bef3a33
2013-12-14scroll_engine: Major rework to support pixel-based scrolling and scroll ↵Thomas Martitz1-2/+7
callbacks. Much of the scrolling work is moved from lcd-bitmap-common to lcd-scroll.c, a small scroll callback routine remains. This callback can potentially be overridden by more extensive scrollers. The callback also gets fed with pixel-based scrolling information, which finally removes the strict line-based nature of the scroll engine. Along with this is the change from scroll_stop_viewport_line() to scroll_stop_viewport_rect() which works on a pixel-based rectangle instead of lines. The ultimate goal is to move most of the scroll work to apps, which can much better decide which line decorations to apply etc. This work is laying the ground work. Change-Id: I3b2885cf7d8696ddd9253d5a9a73318d3d42831a
2013-12-14scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz10-22/+21
lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-07-13Get rid of some superfluous single-purpose functions in playback.Michael Sevakis1-1/+1
* Remove explicit tracking of elapsed time of previous track. * Remove function to obtain auto skip flag. * Most playback events now carry the extra information instead and pass 'struct track_event *' for data. * Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes it cleaner and removes the struct mp3entry. Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
2013-07-12Fix whitespace in files for following commit.Michael Sevakis1-20/+20
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
2013-06-23skin_engine: Fix crash on skin_reset (e.g. on language change).Thomas Martitz1-1/+2
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
2013-06-09Fix warning (move variable into #ifdef section).Thomas Martitz1-2/+2
Change-Id: Ic6ba4b786eef00eab7f20abd5fbf2bcb8977993a
2013-06-09Fix reds (this code needs #ifdef HAVE_ALBUMART)Thomas Martitz1-0/+2
Change-Id: Ia50cd846d5451b0cb5cf3a6f8097ea9fe3b3c60a
2013-06-09skin_engine: Fix albumart logic on skin reloading.Thomas Martitz3-22/+24
This logic checks whether the skin's albumart dimensions differ from the previous skin to force rebuffering if necessary. This was broken since a while as the necessary information was reset. Change-Id: I3b9f3a819c6af202af8ad66c13742f704ce45ab1 Reviewed-on: http://gerrit.rockbox.org/476 Tested-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-03-28simplelist: Fix simplelist_set_line_count() so it actually sets the countJonathan Gordon1-2/+6
(hopefully) Fixes FS#12838 Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
2013-02-28Revert "skin tags: fix the id3 track/disc numbers in conditionals"Jonathan Gordon1-12/+2
This reverts commit a395a346719908e7d02ab7a742eb2b938dcc893d. And fixes FS#12836 - need to rethink how to do this later.
2013-02-26checkwps: show a helpful error if the parser callback errors outJonathan Gordon1-3/+3
Change-Id: Ie3e35292ba8d74f0ff3d1bb3483a5e83aae0e6b6
2013-02-26skin engine: Relax the AA load width/height checksJonathan Gordon1-4/+0
d6c6c07 changed the AA load tag to make sure the image width/heights fit in the viewport, Revert this because it doesn't actually make sense to check it here. Change-Id: I3fe4b074ef8fe88560f2f894ec651027ea3642f4
2013-02-21skin tags: fix the id3 track/disc numbers in conditionalsJonathan Gordon1-2/+12
Fix the %in tag so %xd(a, %in) works as expected Change-Id: I33dd3ae092a66b1363c9cf3afa08075e4534af7c