src/eric7/IconEditor/IconEditorGrid.py

branch
eric7
changeset 11006
a671918232f3
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
11005:b918c6c2736b 11006:a671918232f3
1119 """ 1119 """
1120 Public slot to resize the image. 1120 Public slot to resize the image.
1121 """ 1121 """
1122 from .IconSizeDialog import IconSizeDialog 1122 from .IconSizeDialog import IconSizeDialog
1123 1123
1124 dlg = IconSizeDialog(self.__image.width(), self.__image.height()) 1124 dlg = IconSizeDialog(self.__image.width(), self.__image.height(), parent=self)
1125 res = dlg.exec() 1125 res = dlg.exec()
1126 if res == QDialog.DialogCode.Accepted: 1126 if res == QDialog.DialogCode.Accepted:
1127 newWidth, newHeight = dlg.getData() 1127 newWidth, newHeight = dlg.getData()
1128 if newWidth != self.__image.width() or newHeight != self.__image.height(): 1128 if newWidth != self.__image.width() or newHeight != self.__image.height():
1129 cmd = IconEditCommand(self, self.tr("Resize Image"), self.__image) 1129 cmd = IconEditCommand(self, self.tr("Resize Image"), self.__image)
1142 """ 1142 """
1143 Public slot to generate a new, empty image. 1143 Public slot to generate a new, empty image.
1144 """ 1144 """
1145 from .IconSizeDialog import IconSizeDialog 1145 from .IconSizeDialog import IconSizeDialog
1146 1146
1147 dlg = IconSizeDialog(self.__image.width(), self.__image.height()) 1147 dlg = IconSizeDialog(self.__image.width(), self.__image.height(), parent=self)
1148 res = dlg.exec() 1148 res = dlg.exec()
1149 if res == QDialog.DialogCode.Accepted: 1149 if res == QDialog.DialogCode.Accepted:
1150 width, height = dlg.getData() 1150 width, height = dlg.getData()
1151 img = QImage(width, height, QImage.Format.Format_ARGB32) 1151 img = QImage(width, height, QImage.Format.Format_ARGB32)
1152 img.fill(Qt.GlobalColor.transparent) 1152 img.fill(Qt.GlobalColor.transparent)

eric ide

mercurial