Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Mar 20, 2024
1 parent 4a67339 commit 8c0ba4d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions applications/system/js_app/modules/js_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
#include "../js_modules.h"
#include <dialogs/dialogs.h>

// File icon
#include <gui/icon_i.h>
static const uint8_t _I_file_10px_0[] = {
0x00, 0x7f, 0x00, 0xa1, 0x00, 0x2d, 0x01, 0xe1, 0x01, 0x0d, 0x01,
0x01, 0x01, 0x7d, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01,
};
static const uint8_t* const _I_file_10px[] = {_I_file_10px_0};

static const Icon I_file_10px =
{.width = 10, .height = 10, .frame_count = 1, .frame_rate = 0, .frames = _I_file_10px};
// File icon end

static bool js_dialog_msg_parse_params(struct mjs* mjs, const char** hdr, const char** msg) {
size_t num_args = mjs_nargs(mjs);
if(num_args != 2) {
Expand Down Expand Up @@ -166,6 +178,7 @@ static void js_dialog_pick_file(struct mjs* mjs) {
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
const DialogsFileBrowserOptions browser_options = {
.extension = extension,
.icon = &I_file_10px,
.base_path = base_path,
};
FuriString* path = furi_string_alloc_set(base_path);
Expand Down

0 comments on commit 8c0ba4d

Please sign in to comment.