[FL-2977] Gui: better navigation in file browser dialog (#2014)
* Gui: proper navigation in file browser dialog * Trim file name from start path * File list loading fix * File list offset fix Co-authored-by: nminaylov <nm29719@gmail.com> Co-authored-by: Sergey Gavrilov <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -265,8 +265,7 @@ void archive_file_array_load(ArchiveBrowserView* browser, int8_t dir) {
|
||||
offset_new = model->item_idx - FILE_LIST_BUF_LEN / 4 * 1;
|
||||
}
|
||||
if(offset_new > 0) {
|
||||
offset_new =
|
||||
CLAMP(offset_new, (int32_t)model->item_cnt - FILE_LIST_BUF_LEN, 0);
|
||||
offset_new = CLAMP(offset_new, (int32_t)model->item_cnt, 0);
|
||||
} else {
|
||||
offset_new = 0;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
#define TAB_RIGHT InputKeyRight // Default tab switch direction
|
||||
#define TAB_DEFAULT ArchiveTabFavorites // Start tab
|
||||
#define FILE_LIST_BUF_LEN 100
|
||||
#define FILE_LIST_BUF_LEN 50
|
||||
|
||||
static const char* tab_default_paths[] = {
|
||||
[ArchiveTabFavorites] = "/app:favorites",
|
||||
|
Reference in New Issue
Block a user