feat: architectural improvements for Apps and System Configuration virtual folders in Files
This commit is contained in:
@@ -324,9 +324,9 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
|
||||
&& i < fm->virtual_entry_count
|
||||
&& fm->virtual_entries[i].icon_lg.pixels) {
|
||||
c.icon(icon_x, icon_y, fm->virtual_entries[i].icon_lg);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_SYSTEM_TOOLS_ROOT
|
||||
&& ds->icon_system_tools_lg.pixels) {
|
||||
c.icon(icon_x, icon_y, ds->icon_system_tools_lg);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT
|
||||
&& ds->icon_system_configuration_lg.pixels) {
|
||||
c.icon(icon_x, icon_y, ds->icon_system_configuration_lg);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_APPS_ROOT && ds->icon_apps_lg.pixels) {
|
||||
c.icon(icon_x, icon_y, ds->icon_apps_lg);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_HOME && ds->icon_home_folder_lg.pixels) {
|
||||
@@ -455,9 +455,9 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
|
||||
&& i < fm->virtual_entry_count
|
||||
&& fm->virtual_entries[i].icon_sm.pixels) {
|
||||
c.icon(ico_x, ico_y, fm->virtual_entries[i].icon_sm);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_SYSTEM_TOOLS_ROOT
|
||||
&& ds->icon_system_tools.pixels) {
|
||||
c.icon(ico_x, ico_y, ds->icon_system_tools);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT
|
||||
&& ds->icon_system_configuration.pixels) {
|
||||
c.icon(ico_x, ico_y, ds->icon_system_configuration);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_APPS_ROOT && ds->icon_apps.pixels) {
|
||||
c.icon(ico_x, ico_y, ds->icon_apps);
|
||||
} else if (ds && fm->entry_types[i] == FM_ENTRY_HOME && ds->icon_home_folder.pixels) {
|
||||
@@ -537,9 +537,13 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
|
||||
// Type
|
||||
if (type_col_x > 160 && ty >= list_y && ty + fm_sfh <= c.h) {
|
||||
const char* type_str = "File";
|
||||
if (fm->entry_types[i] == FM_ENTRY_VIRTUAL_APP) type_str = "App";
|
||||
if (fm->entry_types[i] == FM_ENTRY_VIRTUAL_APP) {
|
||||
type_str = fm->virtual_view == FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION
|
||||
? "Applet"
|
||||
: "App";
|
||||
}
|
||||
else if (fm->entry_types[i] == FM_ENTRY_APPS_ROOT) type_str = "Apps";
|
||||
else if (fm->entry_types[i] == FM_ENTRY_SYSTEM_TOOLS_ROOT) type_str = "System";
|
||||
else if (fm->entry_types[i] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT) type_str = "System";
|
||||
else if (fm->entry_types[i] == FM_ENTRY_HOME) type_str = "Home";
|
||||
else if (fm->entry_types[i] == FM_ENTRY_DRIVE) type_str = "Drive";
|
||||
else if (fm->entry_types[i] == FM_ENTRY_DIR) type_str = "Dir";
|
||||
|
||||
Reference in New Issue
Block a user