|Age||Commit message (Collapse)||Author||Files||Lines|
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
HAVE_LCD_BITMAP is now redundant.
lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change
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.
The icon pixel position must be calculated before y is modified.
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)
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.
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.
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.
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.
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.
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).
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.