add fallback icons

This commit is contained in:
2023-01-30 18:58:01 +01:00
parent 3dcdbdf2d5
commit ab74d11827
4 changed files with 11 additions and 7 deletions

View File

@@ -80,8 +80,8 @@ class RAction():
action.setText(self.label)
self._action = action
if self.icon_from_theme:
action.setIcon(Icon.fromTheme(self.icon_from_theme))
if self.icon_file:
action.setIcon(Icon.fromTheme(self.icon_from_theme, self.icon_file))
elif self.icon_file:
action.setIcon(Icon(self.icon_file))
if self.shortcut:
action.setShortcut(self.shortcut)

View File

@@ -23,6 +23,7 @@ class OpenFilePlugin(PluginBase):
def _action_open_file(self) -> RAction:
open_file = RAction(_("&Open..."), self._open_file_dialog, shortcut='Ctrl+O',
icon_from_theme="fileopen",
icon_file="icons/myicons/select-file.svg")
return open_file