Skip to content
Permalink
Browse files

[python console] update toolbar icon and action position

(harmonize position with the processing script editor)
  • Loading branch information
nirvn committed May 20, 2018
1 parent 2ad74b9 commit b0e93a175c15ebe7b7d2d81bbce881490c750d3d
Showing with 14 additions and 12 deletions.
  1. +5 −5 python/console/console.py
  2. +9 −7 python/console/console_editor.py
@@ -193,7 +193,7 @@ def __init__(self, parent=None):
self.saveFileButton = QAction(self)
self.saveFileButton.setCheckable(False)
self.saveFileButton.setEnabled(False)
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveConsole.svg"))
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("mActionFileSave.svg"))
self.saveFileButton.setMenuRole(QAction.PreferencesRole)
self.saveFileButton.setIconVisibleInMenu(True)
self.saveFileButton.setToolTip(saveFileBt)
@@ -203,7 +203,7 @@ def __init__(self, parent=None):
self.saveAsFileButton = QAction(self)
self.saveAsFileButton.setCheckable(False)
self.saveAsFileButton.setEnabled(True)
self.saveAsFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveAsConsole.svg"))
self.saveAsFileButton.setIcon(QgsApplication.getThemeIcon("mActionFileSaveAs.svg"))
self.saveAsFileButton.setMenuRole(QAction.PreferencesRole)
self.saveAsFileButton.setIconVisibleInMenu(True)
self.saveAsFileButton.setToolTip(saveAsFileBt)
@@ -243,7 +243,7 @@ def __init__(self, parent=None):
self.runScriptEditorButton = QAction(self)
self.runScriptEditorButton.setCheckable(False)
self.runScriptEditorButton.setEnabled(True)
self.runScriptEditorButton.setIcon(QgsApplication.getThemeIcon("console/iconRunScriptConsole.svg"))
self.runScriptEditorButton.setIcon(QgsApplication.getThemeIcon("mActionStart.svg"))
self.runScriptEditorButton.setMenuRole(QAction.PreferencesRole)
self.runScriptEditorButton.setIconVisibleInMenu(True)
self.runScriptEditorButton.setToolTip(runScriptEditorBt)
@@ -375,12 +375,12 @@ def __init__(self, parent=None):
self.toolBarEditor.addSeparator()
self.toolBarEditor.addAction(self.runScriptEditorButton)
self.toolBarEditor.addSeparator()
self.toolBarEditor.addAction(self.findTextButton)
self.toolBarEditor.addSeparator()
self.toolBarEditor.addAction(self.cutEditorButton)
self.toolBarEditor.addAction(self.copyEditorButton)
self.toolBarEditor.addAction(self.pasteEditorButton)
self.toolBarEditor.addSeparator()
self.toolBarEditor.addAction(self.findTextButton)
self.toolBarEditor.addSeparator()
self.toolBarEditor.addAction(self.commentEditorButton)
self.toolBarEditor.addAction(self.uncommentEditorButton)
self.toolBarEditor.addSeparator()
@@ -283,7 +283,9 @@ def get_end_pos(self):
def contextMenuEvent(self, e):
menu = QMenu(self)
iconRun = QgsApplication.getThemeIcon("console/mIconRunConsole.svg")
iconRunScript = QgsApplication.getThemeIcon("console/iconRunScriptConsole.svg")
iconRunScript = QgsApplication.getThemeIcon("mActionStart.svg")
iconUndo = QgsApplication.getThemeIcon("mActionUndo.svg")
iconRedo = QgsApplication.getThemeIcon("mActionRedo.svg")
iconCodePad = QgsApplication.getThemeIcon("console/iconCodepadConsole.svg")
iconCommentEditor = QgsApplication.getThemeIcon("console/iconCommentEditorConsole.svg")
iconUncommentEditor = QgsApplication.getThemeIcon("console/iconUncommentEditorConsole.svg")
@@ -308,12 +310,12 @@ def contextMenuEvent(self, e):
QCoreApplication.translate("PythonConsole", "Run Script"),
self.runScriptCode, 'Shift+Ctrl+E')
menu.addSeparator()
undoAction = menu.addAction(
QCoreApplication.translate("PythonConsole", "Undo"),
self.undo, QKeySequence.Undo)
redoAction = menu.addAction(
QCoreApplication.translate("PythonConsole", "Redo"),
self.redo, 'Ctrl+Shift+Z')
undoAction = menu.addAction(iconUndo,
QCoreApplication.translate("PythonConsole", "Undo"),
self.undo, QKeySequence.Undo)
redoAction = menu.addAction(iconRedo,
QCoreApplication.translate("PythonConsole", "Redo"),
self.redo, 'Ctrl+Shift+Z')
menu.addSeparator()
menu.addAction(iconFind,
QCoreApplication.translate("PythonConsole", "Find Text"),

0 comments on commit b0e93a1

Please sign in to comment.
You can’t perform that action at this time.