summaryrefslogtreecommitdiff
path: root/apps/gui/line.c (follow)
Commit message (Collapse)AuthorAge
* Fix greyscale and mono builds.Thomas Martitz2014-03-03
| | | | Change-Id: I511376eb42d1109dbe10d4fc5aa849b21d9f7582
* Touchscreen: Show a line separator in lists.Thomas Martitz2014-03-03
| | | | | | | | | | | | This patch adds a configurable line separator between list items, very similar to lists in Android. Additionally, below the list item there is a thicker line. It can be disabled in the settings. Its color can be configured as well. Remote and monochrome displays are explicitly unsupported. If there is desire this can be changed but it doesn't seem useful to me. Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
* Fix regression introduced by eec89a9.Thomas Martitz2014-03-03
| | | | | | The icon pixel position must be calculated before y is modified. Change-Id: I16947dd8862683530dd7c5f00cfa7cf8d9636e61
* Fix FS#12951: The icons could be a pixel to far down.Thomas Martitz2014-03-03
| | | | | | | | | | | | Since eec89a9 icons have been centered using same calculation as for fonts. In edge cases this is visually different from before and didn't align well to the font's baseline. Revert to the old calculation just for centering icons to fix. A proper aligorithm would take the baseline into account but this has worked sufficiently well for us (fix this if needed) Change-Id: I86593529b16cd28ae4552641e216e73795f2450c
* put_line(): Add another check against possible buffer overflow (see 193911a).Thomas Martitz2014-01-12
| | | | Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
* put_line(): Fix buffer overflow.Thomas Martitz2014-01-12
| | | | | | | | 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
* put_line(): Do not lock up if the scroll engine runs out of lines.Thomas Martitz2014-01-12
| | | | | | | | | | | 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
* Fix remote warnings and charcell reds, and remove minor left-over tuff.Thomas Martitz2014-01-12
| | | | Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
* put_line/scrolling: Make the scroll engine inform custom scrollers about ↵Thomas Martitz2014-01-12
| | | | | | | | | | | | | | | | | | | | | 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
* put_line(): Limit and truncate inline strings to MAX_PATH+32.Thomas Martitz2014-01-09
| | | | | | | | | | | 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
* put_line: Be more careful with changing fg and bg colors.Thomas Martitz2014-01-09
| | | | | | | | 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
* Fix Player red and icons on mono displays.Thomas Martitz2014-01-07
| | | | Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
* Fix a few reds and yellows.Thomas Martitz2014-01-07
| | | | Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
* lcd-common: Remove direct style (line decorations) from lcd-puts* functions.Thomas Martitz2014-01-07
| | | | | | | | | | 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
* Introduce put_line().Thomas Martitz2014-01-07
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