path: root/apps/gui/line.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-2/+0
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[2/4] get rid of HAVE_LCD_CHARCELLSSolomon Peachy1-4/+0
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2014-03-03Fix greyscale and mono builds.Thomas Martitz1-2/+2
Change-Id: I511376eb42d1109dbe10d4fc5aa849b21d9f7582
2014-03-03Touchscreen: Show a line separator in lists.Thomas Martitz1-4/+26
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
2014-03-03Fix regression introduced by eec89a9.Thomas Martitz1-3/+3
The icon pixel position must be calculated before y is modified. Change-Id: I16947dd8862683530dd7c5f00cfa7cf8d9636e61
2014-03-03Fix FS#12951: The icons could be a pixel to far down.Thomas Martitz1-1/+5
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
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-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-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-09put_line(): Limit and truncate inline strings to MAX_PATH+32.Thomas Martitz1-3/+12
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-07Fix a few reds and yellows.Thomas Martitz1-3/+4
Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
2014-01-07lcd-common: Remove direct style (line decorations) from lcd-puts* functions.Thomas Martitz1-2/+1
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-07Introduce put_line().Thomas Martitz1-0/+349
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