pictures/icons moved to QT Res file + some improvments in utils scripts
This commit is contained in:
parent
997213837c
commit
11f15e9f25
8 changed files with 1762 additions and 12 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,8 +1,8 @@
|
|||
*.bak
|
||||
backup/*
|
||||
deb/*
|
||||
__pycache__/*
|
||||
cp2opt.sh
|
||||
regenDesign.sh
|
||||
rebuild.sh
|
||||
.remote-sync.json
|
||||
build/*
|
||||
test.py
|
||||
|
|
|
@ -11,6 +11,7 @@ import os
|
|||
import sys
|
||||
import mozDefragMainWindow
|
||||
import mozDefragAboutWindow
|
||||
import res_pics_rc
|
||||
from libMozDefrag import *
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt5.QtCore import *
|
||||
|
@ -67,9 +68,8 @@ class Ui_mozDefragMainWindow(QtWidgets.QMainWindow, # --- Main ---------------
|
|||
def main(self):
|
||||
self.show()
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(__appDir__ +
|
||||
os.path.sep + "pic" +
|
||||
os.path.sep + "icon.svg"),
|
||||
|
||||
icon.addPixmap(QtGui.QPixmap(":/icon/pic/icon.svg"),
|
||||
QtGui.QIcon.Normal,
|
||||
QtGui.QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'mozDefragAboutWindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
# Created by: PyQt5 UI code generator 5.5.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'mozDefragMainWindow.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
# Created by: PyQt5 UI code generator 5.5.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Ui_MainWindow(object):
|
|||
self.logo_header = QtWidgets.QLabel(self.centralwidget)
|
||||
self.logo_header.setGeometry(QtCore.QRect(0, 0, 400, 115))
|
||||
self.logo_header.setText("")
|
||||
self.logo_header.setPixmap(QtGui.QPixmap("/opt/mozdefrag/pic/logo_header.jpg"))
|
||||
self.logo_header.setPixmap(QtGui.QPixmap(":/pictures/pic/logo_header.jpg"))
|
||||
self.logo_header.setObjectName("logo_header")
|
||||
self.aboutButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.aboutButton.setGeometry(QtCore.QRect(10, 330, 112, 31))
|
||||
|
@ -37,7 +37,6 @@ class Ui_MainWindow(object):
|
|||
self.layoutWidget.setGeometry(QtCore.QRect(20, 130, 141, 71))
|
||||
self.layoutWidget.setObjectName("layoutWidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.checkBoxThunderbird = QtWidgets.QCheckBox(self.layoutWidget)
|
||||
self.checkBoxThunderbird.setObjectName("checkBoxThunderbird")
|
||||
|
@ -59,3 +58,4 @@ class Ui_MainWindow(object):
|
|||
self.checkBoxThunderbird.setText(_translate("MainWindow", "Thunderbird"))
|
||||
self.checkBoxFirefox.setText(_translate("MainWindow", "Firefox"))
|
||||
|
||||
import res_pics_rc
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>/opt/mozdefrag/pic/logo_header.jpg</pixmap>
|
||||
<pixmap resource="res_pics.qrc">:/pictures/pic/logo_header.jpg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="aboutButton">
|
||||
|
@ -112,6 +112,8 @@
|
|||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="res_pics.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
8
res_pics.qrc
Normal file
8
res_pics.qrc
Normal file
|
@ -0,0 +1,8 @@
|
|||
<RCC>
|
||||
<qresource prefix="pictures">
|
||||
<file>pic/logo_header.jpg</file>
|
||||
</qresource>
|
||||
<qresource prefix="icon">
|
||||
<file>pic/icon.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
1741
res_pics_rc.py
Normal file
1741
res_pics_rc.py
Normal file
File diff suppressed because it is too large
Load diff
1
setup.py
1
setup.py
|
@ -4,7 +4,6 @@ mozDefrag cx_Freeze setup file
|
|||
|
||||
from cx_Freeze import setup, Executable
|
||||
|
||||
|
||||
setup(
|
||||
name="mozDefrag",
|
||||
version="0.1",
|
||||
|
|
Loading…
Reference in a new issue