Permalink
Browse files

use svg icon also for dialog box.

	Note that svg doesn't render the shadow casting in QT, Maybe it's an
	inkscape specific feature
  • Loading branch information...
Carreau authored and fperez committed Oct 11, 2011
1 parent 57e7f84 commit e80884fc159ad2d2ca8b0581d74536192da3825b
Showing with 4 additions and 5 deletions.
  1. +4 −5 IPython/frontend/qt/console/qtconsoleapp.py
@@ -187,9 +187,8 @@ def close_tab(self,current_tab):
box.addButton(closeall, QtGui.QMessageBox.YesRole)
box.setDefaultButton(closeall)
box.setEscapeButton(cancel)
- pixmap = QtGui.QPixmap(':/icon/IPythonConsole.png')
- scaledpixmap = pixmap.scaledToWidth(64,mode=QtCore.Qt.SmoothTransformation)
- box.setIconPixmap(scaledpixmap)
+ pixmap = QtGui.QPixmap(self._app.icon.pixmap(QtCore.QSize(64,64)))
+ box.setIconPixmap(pixmap)
reply = box.exec_()
if reply == 1: # close All
for slave in slave_tabs:
@@ -882,8 +881,8 @@ def init_qt_elements(self):
base_path = os.path.abspath(os.path.dirname(__file__))
icon_path = os.path.join(base_path, 'resources', 'icon', 'IPythonConsole.svg')
- icon = QtGui.QIcon(icon_path)
- QtGui.QApplication.setWindowIcon(icon)
+ self.app.icon = QtGui.QIcon(icon_path)
+ QtGui.QApplication.setWindowIcon(self.app.icon)
local_kernel = (not self.existing) or self.ip in LOCAL_IPS
self.widget = self.widget_factory(config=self.config,

0 comments on commit e80884f

Please sign in to comment.