use Icon instead of QIcon

This commit is contained in:
2022-08-28 09:07:34 +02:00
parent 272a0fa076
commit a4052bb43e
5 changed files with 9 additions and 14 deletions

View File

@@ -16,6 +16,7 @@ from src.ui.bigtext.highlighted_range import HighlightedRange
from src.ui.bigtext.highlightingdialog import HighlightingDialog
from src.ui.bigtext.line import Line
from src.ui.bigtext.logFileModel import LogFileModel
from src.ui.icon import Icon
from src.util.conversion import humanbytes
from src.pluginregistry import PluginRegistry
@@ -175,18 +176,18 @@ class InnerBigText(QWidget):
def _open_menu(self, position):
menu = QMenu(self)
copy_clipboard = QAction(QIcon.fromTheme("edit-copy"), _("&Copy to Clipboard"), self,
copy_clipboard = QAction(Icon.fromTheme("edit-copy"), _("&Copy to Clipboard"), self,
triggered=self.copy_selection)
copy_clipboard.setShortcut("CTRL+C")
copy_clipboard.setDisabled(not self._has_selection())
menu.addAction(copy_clipboard)
copy_to_file = QAction(QIcon.fromTheme("document-save-as"), _("Copy to &File"), self,
copy_to_file = QAction(Icon.fromTheme("document-save-as"), _("Copy to &File"), self,
triggered=self._copy_selection_to_file)
copy_to_file.setDisabled(not self._has_selection())
menu.addAction(copy_to_file)
select_all = QAction(QIcon.fromTheme("edit-select-all"), _("Select &All"), self,
select_all = QAction(Icon.fromTheme("edit-select-all"), _("Select &All"), self,
triggered=self._select_all)
select_all.setShortcut("CTRL+A")
menu.addAction(select_all)