diff --git a/angrmanagement/resources/images/toolbar-file-open.ico b/angrmanagement/resources/images/toolbar-file-open.ico deleted file mode 100644 index d020a93567..0000000000 Binary files a/angrmanagement/resources/images/toolbar-file-open.ico and /dev/null differ diff --git a/angrmanagement/resources/images/toolbar-file-save.png b/angrmanagement/resources/images/toolbar-file-save.png deleted file mode 100644 index 569dc33911..0000000000 Binary files a/angrmanagement/resources/images/toolbar-file-save.png and /dev/null differ diff --git a/angrmanagement/ui/icons.py b/angrmanagement/ui/icons.py index b12a8655b5..2b3d224aff 100644 --- a/angrmanagement/ui/icons.py +++ b/angrmanagement/ui/icons.py @@ -17,6 +17,7 @@ "docs": "mdi6.book-open-page-variant", "file": "mdi.file", "file-open": "mdi.folder-open", + "file-save": "mdi.floppy", "functions-view": "mdi.function", "hex-view": "mdi.hexadecimal", "jobs-view": "fa5s.hammer", diff --git a/angrmanagement/ui/menus/file_menu.py b/angrmanagement/ui/menus/file_menu.py index ada4b8cc19..06ba2bf998 100644 --- a/angrmanagement/ui/menus/file_menu.py +++ b/angrmanagement/ui/menus/file_menu.py @@ -26,7 +26,7 @@ class RecentMenuEntry(MenuEntry): def __init__(self, path) -> None: self.path = path - super().__init__(path, self.action_target) + super().__init__(path, self.action_target, icon=icon("file")) def action_target(self) -> None: GlobalInfo.main_window.load_file(self.path) @@ -42,8 +42,18 @@ def __init__(self, main_window: MainWindow) -> None: self._project = main_window.workspace.main_instance.project self._save_entries = [ - MenuEntry("&Save angr database...", main_window.save_database, shortcut=QKeySequence("Ctrl+S")), - MenuEntry("S&ave angr database as...", main_window.save_database_as, shortcut=QKeySequence("Ctrl+Shift+S")), + MenuEntry( + "&Save angr database...", + main_window.save_database, + shortcut=QKeySequence("Ctrl+S"), + icon=icon("file-save"), + ), + MenuEntry( + "S&ave angr database as...", + main_window.save_database_as, + shortcut=QKeySequence("Ctrl+Shift+S"), + icon=icon("file-save"), + ), MenuEntry("Save patched binary as...", main_window.save_patched_binary_as), ] self._edit_save() @@ -52,7 +62,12 @@ def __init__(self, main_window: MainWindow) -> None: self.recent_menu = Menu("Load recent") self.entries.extend( [ - MenuEntry("L&oad a new binary...", main_window.open_file_button, shortcut=QKeySequence("Ctrl+O")), + MenuEntry( + "L&oad a new binary...", + main_window.open_file_button, + shortcut=QKeySequence("Ctrl+O"), + icon=icon("file-open"), + ), *( [] if archr is None @@ -71,7 +86,12 @@ def __init__(self, main_window: MainWindow) -> None: ), self.recent_menu, MenuSeparator(), - MenuEntry("&Load angr database...", main_window.load_database, shortcut=QKeySequence("Ctrl+L")), + MenuEntry( + "&Load angr database...", + main_window.load_database, + shortcut=QKeySequence("Ctrl+L"), + icon=icon("file-open"), + ), *self._save_entries, MenuSeparator(), MenuEntry("Load a new &trace...", main_window.load_trace), diff --git a/angrmanagement/ui/toolbars/file_toolbar.py b/angrmanagement/ui/toolbars/file_toolbar.py index f5869c7faa..7f4ee0b333 100644 --- a/angrmanagement/ui/toolbars/file_toolbar.py +++ b/angrmanagement/ui/toolbars/file_toolbar.py @@ -6,6 +6,7 @@ from PySide6.QtGui import QIcon from angrmanagement.config import IMG_LOCATION +from angrmanagement.ui.icons import icon from .toolbar import Toolbar, ToolbarAction @@ -24,7 +25,7 @@ def __init__(self, main_window: MainWindow) -> None: self.actions = [ ToolbarAction( - QIcon(os.path.join(IMG_LOCATION, "toolbar-file-open.ico")), + icon("file-open"), "Open File", "Open a new file for analysis", main_window.open_file_button, @@ -36,7 +37,7 @@ def __init__(self, main_window: MainWindow) -> None: main_window.open_docker_button, ), ToolbarAction( - QIcon(os.path.join(IMG_LOCATION, "toolbar-file-save.png")), + icon("file-save"), "Save", "Save angr database", main_window.save_database,