From bd89221d332862e69486acdca5cd39957c329581 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 15 Apr 2025 05:03:23 +0200 Subject: [PATCH] jfileselect: improve for fx-CP (hide AutoImport, more padding on items) --- src/jfileselect.c | 6 ++++-- src/jlist.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jfileselect.c b/src/jfileselect.c index 6831720..d5cda80 100644 --- a/src/jfileselect.c +++ b/src/jfileselect.c @@ -21,7 +21,7 @@ static int jfileselect_type_id = -1; # define JFILESELECT_SCROLLBAR_WIDTH 1 # define JFILESELECT_INFO_SHORT 1 #elif GINT_RENDER_RGB -# define JFILESELECT_LINE_SPACING 4 +# define JFILESELECT_LINE_SPACING (J_CONFIG_TOUCH ? 6 : 4) # define JFILESELECT_SCROLLBAR_WIDTH 2 # define JFILESELECT_INFO_SHORT 0 #endif @@ -353,6 +353,8 @@ bool jfileselect_default_filter(struct dirent const *ent) return false; if(!strcmp(ent->d_name, "SAVE-F")) return false; + if(!strcmp(ent->d_name, "AutoImport")) + return false; if(!strcmp(ent->d_name, ".")) return false; if(!strcmp(ent->d_name, "..")) @@ -360,7 +362,7 @@ bool jfileselect_default_filter(struct dirent const *ent) return true; } -static void jfileselect_select(jfileselect *fs, int index) +GUNUSED static void jfileselect_select(jfileselect *fs, int index) { /* Normalize out-of-bounds to -1 */ if(index < 0 || index >= fs->entry_count) diff --git a/src/jlist.c b/src/jlist.c index d208ce3..1302e47 100644 --- a/src/jlist.c +++ b/src/jlist.c @@ -167,7 +167,7 @@ jrect jlist_selected_region(jlist *l) // Polymorphic widget operations //--- -static int item_index_at(void *l0, int ly) +GUNUSED static int item_index_at(void *l0, int ly) { jlist *l = l0; int y = 0;