diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/IconEditor/IconEditorWindow.py --- a/src/eric7/IconEditor/IconEditorWindow.py Tue Oct 18 16:05:20 2022 +0200 +++ b/src/eric7/IconEditor/IconEditorWindow.py Tue Oct 18 16:06:21 2022 +0200 @@ -15,17 +15,17 @@ from PyQt6.QtGui import QPalette, QImage, QImageReader, QImageWriter, QKeySequence from PyQt6.QtWidgets import QScrollArea, QLabel, QDockWidget, QWhatsThis -from EricGui.EricAction import EricAction, createActionGroup -from EricWidgets import EricFileDialog, EricMessageBox -from EricWidgets.EricMainWindow import EricMainWindow -from EricWidgets.EricZoomWidget import EricZoomWidget +from eric7.EricGui.EricAction import EricAction, createActionGroup +from eric7.EricWidgets import EricFileDialog, EricMessageBox +from eric7.EricWidgets.EricMainWindow import EricMainWindow +from eric7.EricWidgets.EricZoomWidget import EricZoomWidget from .IconEditorGrid import IconEditorGrid, IconEditorTool -import UI.PixmapCache -import UI.Config +from eric7.EricGui import EricPixmapCache +from eric7.UI import Config -import Preferences +from eric7 import Preferences class IconEditorWindow(EricMainWindow): @@ -63,7 +63,7 @@ self.fromEric = fromEric self.initShortcutsOnly = initShortcutsOnly - self.setWindowIcon(UI.PixmapCache.getIcon("iconEditor")) + self.setWindowIcon(EricPixmapCache.getIcon("iconEditor")) if self.initShortcutsOnly: self.__initActions() @@ -192,7 +192,7 @@ """ self.newAct = EricAction( self.tr("New"), - UI.PixmapCache.getIcon("new"), + EricPixmapCache.getIcon("new"), self.tr("&New"), QKeySequence(self.tr("Ctrl+N", "File|New")), 0, @@ -208,7 +208,7 @@ self.newWindowAct = EricAction( self.tr("New Window"), - UI.PixmapCache.getIcon("newWindow"), + EricPixmapCache.getIcon("newWindow"), self.tr("New &Window"), 0, 0, @@ -227,7 +227,7 @@ self.openAct = EricAction( self.tr("Open"), - UI.PixmapCache.getIcon("open"), + EricPixmapCache.getIcon("open"), self.tr("&Open..."), QKeySequence(self.tr("Ctrl+O", "File|Open")), 0, @@ -247,7 +247,7 @@ self.saveAct = EricAction( self.tr("Save"), - UI.PixmapCache.getIcon("fileSave"), + EricPixmapCache.getIcon("fileSave"), self.tr("&Save"), QKeySequence(self.tr("Ctrl+S", "File|Save")), 0, @@ -266,7 +266,7 @@ self.saveAsAct = EricAction( self.tr("Save As"), - UI.PixmapCache.getIcon("fileSaveAs"), + EricPixmapCache.getIcon("fileSaveAs"), self.tr("Save &As..."), QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), 0, @@ -285,7 +285,7 @@ self.closeAct = EricAction( self.tr("Close"), - UI.PixmapCache.getIcon("close"), + EricPixmapCache.getIcon("close"), self.tr("&Close"), QKeySequence(self.tr("Ctrl+W", "File|Close")), 0, @@ -339,7 +339,7 @@ self.exitAct = EricAction( self.tr("Quit"), - UI.PixmapCache.getIcon("exit"), + EricPixmapCache.getIcon("exit"), self.tr("&Quit"), QKeySequence(self.tr("Ctrl+Q", "File|Quit")), 0, @@ -360,7 +360,7 @@ """ self.undoAct = EricAction( self.tr("Undo"), - UI.PixmapCache.getIcon("editUndo"), + EricPixmapCache.getIcon("editUndo"), self.tr("&Undo"), QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), QKeySequence(self.tr("Alt+Backspace", "Edit|Undo")), @@ -376,7 +376,7 @@ self.redoAct = EricAction( self.tr("Redo"), - UI.PixmapCache.getIcon("editRedo"), + EricPixmapCache.getIcon("editRedo"), self.tr("&Redo"), QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), 0, @@ -392,7 +392,7 @@ self.cutAct = EricAction( self.tr("Cut"), - UI.PixmapCache.getIcon("editCut"), + EricPixmapCache.getIcon("editCut"), self.tr("Cu&t"), QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), QKeySequence(self.tr("Shift+Del", "Edit|Cut")), @@ -411,7 +411,7 @@ self.copyAct = EricAction( self.tr("Copy"), - UI.PixmapCache.getIcon("editCopy"), + EricPixmapCache.getIcon("editCopy"), self.tr("&Copy"), QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), QKeySequence(self.tr("Ctrl+Ins", "Edit|Copy")), @@ -430,7 +430,7 @@ self.pasteAct = EricAction( self.tr("Paste"), - UI.PixmapCache.getIcon("editPaste"), + EricPixmapCache.getIcon("editPaste"), self.tr("&Paste"), QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), QKeySequence(self.tr("Shift+Ins", "Edit|Paste")), @@ -466,7 +466,7 @@ self.deleteAct = EricAction( self.tr("Clear"), - UI.PixmapCache.getIcon("editDelete"), + EricPixmapCache.getIcon("editDelete"), self.tr("Cl&ear"), QKeySequence(self.tr("Alt+Shift+C", "Edit|Clear")), 0, @@ -503,7 +503,7 @@ self.resizeAct = EricAction( self.tr("Change Size"), - UI.PixmapCache.getIcon("transformResize"), + EricPixmapCache.getIcon("transformResize"), self.tr("Change Si&ze..."), 0, 0, @@ -519,7 +519,7 @@ self.grayscaleAct = EricAction( self.tr("Grayscale"), - UI.PixmapCache.getIcon("grayscale"), + EricPixmapCache.getIcon("grayscale"), self.tr("&Grayscale"), 0, 0, @@ -555,7 +555,7 @@ """ self.zoomInAct = EricAction( self.tr("Zoom in"), - UI.PixmapCache.getIcon("zoomIn"), + EricPixmapCache.getIcon("zoomIn"), self.tr("Zoom &in"), QKeySequence(self.tr("Ctrl++", "View|Zoom in")), 0, @@ -574,7 +574,7 @@ self.zoomOutAct = EricAction( self.tr("Zoom out"), - UI.PixmapCache.getIcon("zoomOut"), + EricPixmapCache.getIcon("zoomOut"), self.tr("Zoom &out"), QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), 0, @@ -593,7 +593,7 @@ self.zoomResetAct = EricAction( self.tr("Zoom reset"), - UI.PixmapCache.getIcon("zoomReset"), + EricPixmapCache.getIcon("zoomReset"), self.tr("Zoom &reset"), QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), 0, @@ -613,7 +613,7 @@ self.showGridAct = EricAction( self.tr("Show Grid"), - UI.PixmapCache.getIcon("grid"), + EricPixmapCache.getIcon("grid"), self.tr("Show &Grid"), 0, 0, @@ -641,7 +641,7 @@ self.drawPencilAct = EricAction( self.tr("Freehand"), - UI.PixmapCache.getIcon("drawBrush"), + EricPixmapCache.getIcon("drawBrush"), self.tr("&Freehand"), 0, 0, @@ -658,7 +658,7 @@ self.drawColorPickerAct = EricAction( self.tr("Color Picker"), - UI.PixmapCache.getIcon("colorPicker"), + EricPixmapCache.getIcon("colorPicker"), self.tr("&Color Picker"), 0, 0, @@ -679,7 +679,7 @@ self.drawRectangleAct = EricAction( self.tr("Rectangle"), - UI.PixmapCache.getIcon("drawRectangle"), + EricPixmapCache.getIcon("drawRectangle"), self.tr("&Rectangle"), 0, 0, @@ -696,7 +696,7 @@ self.drawFilledRectangleAct = EricAction( self.tr("Filled Rectangle"), - UI.PixmapCache.getIcon("drawRectangleFilled"), + EricPixmapCache.getIcon("drawRectangleFilled"), self.tr("F&illed Rectangle"), 0, 0, @@ -715,7 +715,7 @@ self.drawCircleAct = EricAction( self.tr("Circle"), - UI.PixmapCache.getIcon("drawCircle"), + EricPixmapCache.getIcon("drawCircle"), self.tr("Circle"), 0, 0, @@ -732,7 +732,7 @@ self.drawFilledCircleAct = EricAction( self.tr("Filled Circle"), - UI.PixmapCache.getIcon("drawCircleFilled"), + EricPixmapCache.getIcon("drawCircleFilled"), self.tr("Fille&d Circle"), 0, 0, @@ -749,7 +749,7 @@ self.drawEllipseAct = EricAction( self.tr("Ellipse"), - UI.PixmapCache.getIcon("drawEllipse"), + EricPixmapCache.getIcon("drawEllipse"), self.tr("&Ellipse"), 0, 0, @@ -766,7 +766,7 @@ self.drawFilledEllipseAct = EricAction( self.tr("Filled Ellipse"), - UI.PixmapCache.getIcon("drawEllipseFilled"), + EricPixmapCache.getIcon("drawEllipseFilled"), self.tr("Fille&d Elli&pse"), 0, 0, @@ -783,7 +783,7 @@ self.drawFloodFillAct = EricAction( self.tr("Flood Fill"), - UI.PixmapCache.getIcon("drawFill"), + EricPixmapCache.getIcon("drawFill"), self.tr("Fl&ood Fill"), 0, 0, @@ -804,7 +804,7 @@ self.drawLineAct = EricAction( self.tr("Line"), - UI.PixmapCache.getIcon("drawLine"), + EricPixmapCache.getIcon("drawLine"), self.tr("&Line"), 0, 0, @@ -821,7 +821,7 @@ self.drawEraserAct = EricAction( self.tr("Eraser (Transparent)"), - UI.PixmapCache.getIcon("drawEraser"), + EricPixmapCache.getIcon("drawEraser"), self.tr("Eraser (&Transparent)"), 0, 0, @@ -841,7 +841,7 @@ self.drawRectangleSelectionAct = EricAction( self.tr("Rectangular Selection"), - UI.PixmapCache.getIcon("selectRectangle"), + EricPixmapCache.getIcon("selectRectangle"), self.tr("Rect&angular Selection"), 0, 0, @@ -864,7 +864,7 @@ self.drawCircleSelectionAct = EricAction( self.tr("Circular Selection"), - UI.PixmapCache.getIcon("selectCircle"), + EricPixmapCache.getIcon("selectCircle"), self.tr("Rect&angular Selection"), 0, 0, @@ -924,7 +924,7 @@ self.whatsThisAct = EricAction( self.tr("What's This?"), - UI.PixmapCache.getIcon("whatsThis"), + EricPixmapCache.getIcon("whatsThis"), self.tr("&What's This?"), QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), 0, @@ -1023,7 +1023,7 @@ """ filetb = self.addToolBar(self.tr("File")) filetb.setObjectName("FileToolBar") - filetb.setIconSize(UI.Config.ToolBarIconSize) + filetb.setIconSize(Config.ToolBarIconSize) filetb.addAction(self.newAct) filetb.addAction(self.newWindowAct) filetb.addAction(self.openAct) @@ -1037,7 +1037,7 @@ edittb = self.addToolBar(self.tr("Edit")) edittb.setObjectName("EditToolBar") - edittb.setIconSize(UI.Config.ToolBarIconSize) + edittb.setIconSize(Config.ToolBarIconSize) edittb.addAction(self.undoAct) edittb.addAction(self.redoAct) edittb.addSeparator() @@ -1050,12 +1050,12 @@ viewtb = self.addToolBar(self.tr("View")) viewtb.setObjectName("ViewToolBar") - viewtb.setIconSize(UI.Config.ToolBarIconSize) + viewtb.setIconSize(Config.ToolBarIconSize) viewtb.addAction(self.showGridAct) toolstb = self.addToolBar(self.tr("Tools")) toolstb.setObjectName("ToolsToolBar") - toolstb.setIconSize(UI.Config.ToolBarIconSize) + toolstb.setIconSize(Config.ToolBarIconSize) toolstb.addAction(self.drawPencilAct) toolstb.addAction(self.drawColorPickerAct) toolstb.addAction(self.drawRectangleAct) @@ -1073,7 +1073,7 @@ helptb = self.addToolBar(self.tr("Help")) helptb.setObjectName("HelpToolBar") - helptb.setIconSize(UI.Config.ToolBarIconSize) + helptb.setIconSize(Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) def __createStatusBar(self): @@ -1101,9 +1101,9 @@ self.__updatePosition(0, 0) self.__zoomWidget = EricZoomWidget( - UI.PixmapCache.getPixmap("zoomOut"), - UI.PixmapCache.getPixmap("zoomIn"), - UI.PixmapCache.getPixmap("zoomReset"), + EricPixmapCache.getPixmap("zoomOut"), + EricPixmapCache.getPixmap("zoomIn"), + EricPixmapCache.getPixmap("zoomReset"), self, ) self.__zoomWidget.setMinimum(IconEditorGrid.ZoomMinimum)