Some cosmetic improvements in menu and in About window

This commit is contained in:
Rinaldus 2017-10-10 14:20:30 +03:00
parent 6b73eb58bc
commit d7378800d0
Signed by: Rinaldus
GPG Key ID: C34E249005178E87
5 changed files with 1914 additions and 1910 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2015-2016, Peter Svirshchevskiy Copyright (c) 2015-2017, Peter Svirshchevskiy
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -95,19 +95,23 @@ class Window(QDialog):
# Menu actions # Menu actions
def createActions(self): def createActions(self):
self.detailsShow = QAction(QIcon(':icons/details.png'),"&Details", self, triggered=self.detailsShow) self.detailsShow = QAction(QIcon(':icons/details.png'),"&Details...", self, triggered=self.detailsShow)
self.aboutShow = QAction(QIcon(':icons/mailbox_empty.png'),"&About", self, triggered=self.aboutShow) self.aboutShow = QAction(QIcon(':icons/mailbox_empty.png'),"&About " + programTitle + "...", self, triggered=self.aboutShow)
self.checkNow = QAction(QIcon(':icons/check_now.png'),"&Check now", self, triggered=mail_check) self.checkNow = QAction(QIcon(':icons/check_now.png'),"&Check now", self, triggered=mail_check)
self.restoreAction = QAction(QIcon(":icons/settings.png"),"&Settings", self, triggered=self.showNormal) self.restoreAction = QAction(QIcon(":icons/settings.png"),"&Settings...", self, triggered=self.showNormal)
self.quitAction = QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit) self.quitAction = QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit)
# UI functions # UI functions
def createTrayIcon(self): def createTrayIcon(self):
self.trayIconMenu = QMenu(self) self.trayIconMenu = QMenu(self)
self.trayIconMenu.addAction(self.aboutShow) f = self.trayIconMenu.font()
f.setBold(True)
self.detailsShow.setFont(f)
self.trayIconMenu.addAction(self.detailsShow) self.trayIconMenu.addAction(self.detailsShow)
self.trayIconMenu.addSeparator()
self.trayIconMenu.addAction(self.checkNow) self.trayIconMenu.addAction(self.checkNow)
self.trayIconMenu.addAction(self.restoreAction) self.trayIconMenu.addAction(self.restoreAction)
self.trayIconMenu.addAction(self.aboutShow)
self.trayIconMenu.addAction(self.quitAction) self.trayIconMenu.addAction(self.quitAction)
self.trayIcon = QSystemTrayIcon(self) self.trayIcon = QSystemTrayIcon(self)
self.trayIcon.setContextMenu(self.trayIconMenu) self.trayIcon.setContextMenu(self.trayIconMenu)
@ -247,7 +251,7 @@ class About(QDialog):
self.ui = Ui_about() self.ui = Ui_about()
self.ui.setupUi(self) self.ui.setupUi(self)
self.setWindowFlags(QtCore.Qt.Tool) self.setWindowFlags(QtCore.Qt.Tool)
self.setFixedSize(483,334) self.setFixedSize(511,334)
self.ui.lblNameVersion.setText(programTitle + " " + programVersion) self.ui.lblNameVersion.setText(programTitle + " " + programVersion)

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>483</width> <width>511</width>
<height>334</height> <height>334</height>
</rect> </rect>
</property> </property>
@ -60,7 +60,7 @@
<rect> <rect>
<x>200</x> <x>200</x>
<y>40</y> <y>40</y>
<width>261</width> <width>291</width>
<height>31</height> <height>31</height>
</rect> </rect>
</property> </property>

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/about.ui' # Form implementation generated from reading ui file 'ui/about.ui'
# #
# Created by: PyQt5 UI code generator 5.6.1.dev1604271126 # Created by: PyQt5 UI code generator 5.8.2
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_about(object): class Ui_about(object):
def setupUi(self, about): def setupUi(self, about):
about.setObjectName("about") about.setObjectName("about")
about.resize(483, 334) about.resize(511, 334)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -31,7 +31,7 @@ class Ui_about(object):
self.lblLogo.setScaledContents(True) self.lblLogo.setScaledContents(True)
self.lblLogo.setObjectName("lblLogo") self.lblLogo.setObjectName("lblLogo")
self.lblNameVersion = QtWidgets.QLabel(about) self.lblNameVersion = QtWidgets.QLabel(about)
self.lblNameVersion.setGeometry(QtCore.QRect(200, 40, 261, 31)) self.lblNameVersion.setGeometry(QtCore.QRect(200, 40, 291, 31))
self.lblNameVersion.setMinimumSize(QtCore.QSize(203, 0)) self.lblNameVersion.setMinimumSize(QtCore.QSize(203, 0))
font = QtGui.QFont() font = QtGui.QFont()
font.setPointSize(20) font.setPointSize(20)