Gui: scrollable long file names in FileBrowser and Archive Browser (#2159)

* Gui: scrollable long file names in FileBrowser
* Archive: scroll long file names
* Gui: elements code cleanup
This commit is contained in:
あく
2022-12-20 20:11:52 +09:00
committed by GitHub
parent 0286636183
commit e7107e39f7
7 changed files with 174 additions and 9 deletions

View File

@@ -192,6 +192,25 @@ void elements_bubble_str(
*/
void elements_string_fit_width(Canvas* canvas, FuriString* string, uint8_t width);
/** Draw scrollable text line
*
* @param canvas The canvas
* @param[in] x X coordinate
* @param[in] y Y coordinate
* @param[in] width The width
* @param string The string
* @param[in] scroll The scroll counter: 0 - no scroll, any other number - scroll. Just count up, everything else will be calculated on the inside.
* @param[in] ellipsis The ellipsis flag: true to add ellipse
*/
void elements_scrollable_text_line(
Canvas* canvas,
uint8_t x,
uint8_t y,
uint8_t width,
FuriString* string,
size_t scroll,
bool ellipsis);
/** Draw text box element
*
* @param canvas Canvas instance