[FL-1234] Keyboards redesign (#501)

* text input: keyboard redesign,; input: tune repeat keypress timing; archive: fix max string width when scrollbar is shown

* byte input: redesign

* byte/text input: long press back to activate backspace added

* archive: pass absolute path to app

* format sources

* better keyboard timings

Co-authored-by: SG <who.just.the.doctor@gmail.com>
This commit is contained in:
its your bedtime
2021-06-02 15:51:05 +03:00
committed by GitHub
parent 7f16c9fe5a
commit d5df0483a3
5 changed files with 96 additions and 38 deletions

View File

@@ -130,7 +130,6 @@ static void set_file_type(ArchiveFile_t* file, FileInfo* file_info) {
static bool archive_get_filenames(ArchiveApp* archive) {
furi_assert(archive);
FS_Dir_Api* dir_api = &archive->fs_api->dir;
ArchiveFile_t item;
FileInfo file_info;
@@ -169,7 +168,6 @@ static bool archive_get_filenames(ArchiveApp* archive) {
files_array_push_back(model->files, item);
ArchiveFile_t_clear(&item);
}
} else {
dir_api->close(&directory);
string_clear(name);
@@ -329,8 +327,15 @@ static void archive_file_menu_callback(ArchiveApp* archive) {
switch(model->menu_idx) {
case 0:
if((selected->type != ArchiveFileTypeFolder && selected->type != ArchiveFileTypeUnknown)) {
string_t full_path;
string_init_set(full_path, archive->browser.path);
string_cat(full_path, "/");
string_cat(full_path, selected->name);
archive_open_app(
archive, flipper_app_name[selected->type], string_get_cstr(selected->name));
archive, flipper_app_name[selected->type], string_get_cstr(full_path));
string_clear(full_path);
}
break;
case 1:

View File

@@ -89,7 +89,7 @@ static void draw_list(Canvas* canvas, ArchiveViewModel* model) {
string_set(str_buff, file->name);
if(is_known_app(file->type)) trim_file_ext(str_buff);
elements_string_fit_width(canvas, str_buff, MAX_LEN_PX);
elements_string_fit_width(canvas, str_buff, scrollbar ? MAX_LEN_PX - 6 : MAX_LEN_PX);
if(model->idx == idx) {
archive_draw_frame(canvas, i, scrollbar);