From add7973b3d1633b2776cb90f237415c6cac65d99 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 14 Sep 2012 08:34:59 +0900 Subject: set app icon (shows on window, minimized icons and about dialog) --- src/leap/baseapp/leap_app.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/leap/baseapp/leap_app.py') diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py index 18b5084b..208c4e7c 100644 --- a/src/leap/baseapp/leap_app.py +++ b/src/leap/baseapp/leap_app.py @@ -7,6 +7,9 @@ from leap.gui import mainwindow_rc logger = logging.getLogger(name=__name__) +APP_LOGO = ':/images/leap-color-small.png' + + class MainWindowMixin(object): """ create the main window @@ -32,25 +35,30 @@ class MainWindowMixin(object): widget.setLayout(mainLayout) self.setWindowTitle("LEAP Client") + self.set_app_icon() self.resize(400, 300) self.set_statusbarMessage('ready') + def set_app_icon(self): + icon = QtGui.QIcon(APP_LOGO) + self.setWindowIcon(icon) + def createWindowHeader(self): """ description lines for main window """ self.headerBox = QtGui.QGroupBox() - self.headerLabel = QtGui.QLabel("Encryption \ -Internet Proxy") - self.headerLabelSub = QtGui.QLabel("trust your \ -technolust") + self.headerLabel = QtGui.QLabel( + "LEAP Encryption Access Project") + self.headerLabelSub = QtGui.QLabel( + "
your internet encryption toolkit") - pixmap = QtGui.QPixmap(':/images/leap-color-small.png') - frog_lbl = QtGui.QLabel() - frog_lbl.setPixmap(pixmap) + pixmap = QtGui.QPixmap(APP_LOGO) + leap_lbl = QtGui.QLabel() + leap_lbl.setPixmap(pixmap) headerLayout = QtGui.QHBoxLayout() - headerLayout.addWidget(frog_lbl) + headerLayout.addWidget(leap_lbl) headerLayout.addWidget(self.headerLabel) headerLayout.addWidget(self.headerLabelSub) headerLayout.addStretch() -- cgit v1.2.3