feat: refresh button in Files, svg.hpp arc handling
This commit is contained in:
@@ -51,6 +51,7 @@ void filemanager_on_mouse(Window* win, MouseEvent& ev) {
|
||||
case CTX_DELETE: filemanager_delete_selected(fm); break;
|
||||
case CTX_NEW_FOLDER: filemanager_new_folder(fm); break;
|
||||
case CTX_PROPERTIES: filemanager_show_properties(fm, target); break;
|
||||
case CTX_REFRESH: filemanager_refresh(fm); break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -79,21 +80,22 @@ void filemanager_on_mouse(Window* win, MouseEvent& ev) {
|
||||
// Toolbar button clicks
|
||||
if (local_y < FM_TOOLBAR_H) {
|
||||
// Navigation buttons
|
||||
if (local_x >= 4 && local_x < 28) filemanager_go_back(fm);
|
||||
if (local_x >= 4 && local_x < 28) filemanager_go_back(fm);
|
||||
else if (local_x >= 32 && local_x < 56) filemanager_go_forward(fm);
|
||||
else if (local_x >= 60 && local_x < 84) filemanager_go_up(fm);
|
||||
else if (local_x >= 88 && local_x < 112) filemanager_go_home(fm);
|
||||
else if (local_x >= 120 && local_x < 144) {
|
||||
else if (local_x >= 88 && local_x < 112) filemanager_go_home(fm);
|
||||
else if (local_x >= 116 && local_x < 140) filemanager_refresh(fm);
|
||||
else if (local_x >= 148 && local_x < 172) {
|
||||
fm->grid_view = !fm->grid_view;
|
||||
fm->scrollbar.scroll_offset = 0;
|
||||
}
|
||||
// Action buttons
|
||||
else if (local_x >= 160 && local_x < 184) filemanager_do_copy(fm);
|
||||
else if (local_x >= 188 && local_x < 212) filemanager_do_cut(fm);
|
||||
else if (local_x >= 216 && local_x < 240) filemanager_do_paste(fm);
|
||||
else if (local_x >= 244 && local_x < 268) filemanager_start_rename(fm);
|
||||
else if (local_x >= 272 && local_x < 296) filemanager_new_folder(fm);
|
||||
else if (local_x >= 300 && local_x < 324) filemanager_delete_selected(fm);
|
||||
else if (local_x >= 188 && local_x < 212) filemanager_do_copy(fm);
|
||||
else if (local_x >= 216 && local_x < 240) filemanager_do_cut(fm);
|
||||
else if (local_x >= 244 && local_x < 268) filemanager_do_paste(fm);
|
||||
else if (local_x >= 272 && local_x < 296) filemanager_start_rename(fm);
|
||||
else if (local_x >= 300 && local_x < 324) filemanager_new_folder(fm);
|
||||
else if (local_x >= 328 && local_x < 352) filemanager_delete_selected(fm);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user