Skip to content

Commit 8c0ba4d

Browse files
committed
add icon
1 parent 4a67339 commit 8c0ba4d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

applications/system/js_app/modules/js_dialog.c

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
#include "../js_modules.h"
33
#include <dialogs/dialogs.h>
44

5+
// File icon
6+
#include <gui/icon_i.h>
7+
static const uint8_t _I_file_10px_0[] = {
8+
0x00, 0x7f, 0x00, 0xa1, 0x00, 0x2d, 0x01, 0xe1, 0x01, 0x0d, 0x01,
9+
0x01, 0x01, 0x7d, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01,
10+
};
11+
static const uint8_t* const _I_file_10px[] = {_I_file_10px_0};
12+
13+
static const Icon I_file_10px =
14+
{.width = 10, .height = 10, .frame_count = 1, .frame_rate = 0, .frames = _I_file_10px};
15+
// File icon end
16+
517
static bool js_dialog_msg_parse_params(struct mjs* mjs, const char** hdr, const char** msg) {
618
size_t num_args = mjs_nargs(mjs);
719
if(num_args != 2) {
@@ -166,6 +178,7 @@ static void js_dialog_pick_file(struct mjs* mjs) {
166178
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
167179
const DialogsFileBrowserOptions browser_options = {
168180
.extension = extension,
181+
.icon = &I_file_10px,
169182
.base_path = base_path,
170183
};
171184
FuriString* path = furi_string_alloc_set(base_path);

0 commit comments

Comments
 (0)