Skip to content

Commit 90abe24

Browse files
committed
minor updates
1 parent 46c0ee1 commit 90abe24

11 files changed

Lines changed: 66 additions & 26 deletions

License.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2025 amdilan
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

app/resourcePath.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ def resource_path(relative_path):
88
# PyInstaller creates a temp folder and stores path in _MEIPASS
99
base_path = sys._MEIPASS
1010
except Exception:
11-
# base_path = os.path.abspath(".")
11+
base_path = os.path.abspath(".")
1212
# base_path = os.path.dirname(os.path.abspath(__file__))
13-
base_path = os.path.dirname(sys.executable if getattr(sys, 'frozen', False) else os.path.abspath(__file__))
13+
# base_path = os.path.dirname(sys.executable if getattr(sys, 'frozen', False) else os.path.abspath(__file__))
1414

1515
return os.path.join(base_path, relative_path)
1616

@@ -19,7 +19,7 @@ def external_path(relative_path):
1919
base_path = os.path.dirname(sys.executable if getattr(sys, 'frozen', False) else os.path.abspath(__file__))
2020
return os.path.join(base_path, relative_path)
2121

22-
def ResourcePath(relative_path, local):
22+
def ResourcePath(relative_path, local=None):
2323
""" Get path according to location specification. If external use "ext" after relative path:
2424
ResourcePath(relative_path, 'ext')
2525
"""

ui/Devs_dialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10-
10+
import app
1111

1212
class Ui_DevDialog(object):
1313
def setupUi(self, DevDialog):
@@ -24,7 +24,7 @@ def setupUi(self, DevDialog):
2424
font.setPointSize(10)
2525
DevDialog.setFont(font)
2626
icon = QtGui.QIcon()
27-
icon.addPixmap(QtGui.QPixmap("ui\\assets/drawer.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
27+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\drawer.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2828
DevDialog.setWindowIcon(icon)
2929
self.lineEditDev = QtWidgets.QLineEdit(parent=DevDialog)
3030
self.lineEditDev.setGeometry(QtCore.QRect(20, 210, 311, 21))

ui/about.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10+
import app
1011

1112

1213
class Ui_DialogAbout(object):
@@ -24,50 +25,57 @@ def setupUi(self, DialogAbout):
2425
font.setPointSize(10)
2526
DialogAbout.setFont(font)
2627
icon = QtGui.QIcon()
27-
icon.addPixmap(QtGui.QPixmap("ui\\assets/icon.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
28+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\icon.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2829
DialogAbout.setWindowIcon(icon)
2930
self.label = QtWidgets.QLabel(parent=DialogAbout)
3031
self.label.setGeometry(QtCore.QRect(20, 20, 64, 64))
3132
self.label.setText("")
32-
self.label.setPixmap(QtGui.QPixmap("ui\\assets/database.png"))
33+
self.label.setPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\database.png")))
3334
self.label.setScaledContents(True)
3435
self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
3536
self.label.setObjectName("label")
3637
self.label_2 = QtWidgets.QLabel(parent=DialogAbout)
37-
self.label_2.setGeometry(QtCore.QRect(100, 30, 241, 21))
38+
self.label_2.setGeometry(QtCore.QRect(100, 20, 241, 21))
3839
font = QtGui.QFont()
3940
font.setFamily("Calibri")
4041
font.setPointSize(14)
4142
self.label_2.setFont(font)
4243
self.label_2.setObjectName("label_2")
4344
self.labelPyQtVersion = QtWidgets.QLabel(parent=DialogAbout)
44-
self.labelPyQtVersion.setGeometry(QtCore.QRect(120, 100, 180, 20))
45+
self.labelPyQtVersion.setGeometry(QtCore.QRect(120, 90, 180, 20))
4546
font = QtGui.QFont()
4647
font.setFamily("Segoe UI")
4748
font.setPointSize(10)
4849
self.labelPyQtVersion.setFont(font)
4950
self.labelPyQtVersion.setObjectName("labelPyQtVersion")
5051
self.labelPyVersion = QtWidgets.QLabel(parent=DialogAbout)
51-
self.labelPyVersion.setGeometry(QtCore.QRect(120, 80, 180, 20))
52+
self.labelPyVersion.setGeometry(QtCore.QRect(120, 70, 180, 20))
5253
font = QtGui.QFont()
5354
font.setFamily("Segoe UI")
5455
font.setPointSize(10)
5556
self.labelPyVersion.setFont(font)
5657
self.labelPyVersion.setObjectName("labelPyVersion")
5758
self.labelVersion = QtWidgets.QLabel(parent=DialogAbout)
58-
self.labelVersion.setGeometry(QtCore.QRect(120, 60, 180, 20))
59+
self.labelVersion.setGeometry(QtCore.QRect(120, 50, 180, 20))
5960
font = QtGui.QFont()
6061
font.setFamily("Segoe UI")
6162
font.setPointSize(10)
6263
self.labelVersion.setFont(font)
6364
self.labelVersion.setObjectName("labelVersion")
6465
self.labelGithub = QtWidgets.QLabel(parent=DialogAbout)
65-
self.labelGithub.setGeometry(QtCore.QRect(120, 120, 180, 20))
66+
self.labelGithub.setGeometry(QtCore.QRect(120, 110, 180, 20))
6667
font = QtGui.QFont()
6768
font.setFamily("Segoe UI")
6869
font.setPointSize(10)
6970
self.labelGithub.setFont(font)
7071
self.labelGithub.setObjectName("labelGithub")
72+
self.labelCopyright = QtWidgets.QLabel(parent=DialogAbout)
73+
self.labelCopyright.setGeometry(QtCore.QRect(110, 140, 180, 20))
74+
font = QtGui.QFont()
75+
font.setFamily("Segoe UI")
76+
font.setPointSize(10)
77+
self.labelCopyright.setFont(font)
78+
self.labelCopyright.setObjectName("labelCopyright")
7179

7280
self.retranslateUi(DialogAbout)
7381
QtCore.QMetaObject.connectSlotsByName(DialogAbout)
@@ -80,6 +88,7 @@ def retranslateUi(self, DialogAbout):
8088
self.labelPyVersion.setText(_translate("DialogAbout", "Python Version"))
8189
self.labelVersion.setText(_translate("DialogAbout", "Version"))
8290
self.labelGithub.setText(_translate("DialogAbout", "Github Link"))
91+
self.labelCopyright.setText(_translate("DialogAbout", "Copyright 2025 amdilan"))
8392

8493

8594
if __name__ == "__main__":

ui/about.ui

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<property name="geometry">
6767
<rect>
6868
<x>100</x>
69-
<y>30</y>
69+
<y>20</y>
7070
<width>241</width>
7171
<height>21</height>
7272
</rect>
@@ -85,7 +85,7 @@
8585
<property name="geometry">
8686
<rect>
8787
<x>120</x>
88-
<y>100</y>
88+
<y>90</y>
8989
<width>180</width>
9090
<height>20</height>
9191
</rect>
@@ -104,7 +104,7 @@
104104
<property name="geometry">
105105
<rect>
106106
<x>120</x>
107-
<y>80</y>
107+
<y>70</y>
108108
<width>180</width>
109109
<height>20</height>
110110
</rect>
@@ -123,7 +123,7 @@
123123
<property name="geometry">
124124
<rect>
125125
<x>120</x>
126-
<y>60</y>
126+
<y>50</y>
127127
<width>180</width>
128128
<height>20</height>
129129
</rect>
@@ -142,7 +142,7 @@
142142
<property name="geometry">
143143
<rect>
144144
<x>120</x>
145-
<y>120</y>
145+
<y>110</y>
146146
<width>180</width>
147147
<height>20</height>
148148
</rect>
@@ -157,6 +157,25 @@
157157
<string>Github Link</string>
158158
</property>
159159
</widget>
160+
<widget class="QLabel" name="labelCopyright">
161+
<property name="geometry">
162+
<rect>
163+
<x>110</x>
164+
<y>140</y>
165+
<width>180</width>
166+
<height>20</height>
167+
</rect>
168+
</property>
169+
<property name="font">
170+
<font>
171+
<family>Segoe UI</family>
172+
<pointsize>10</pointsize>
173+
</font>
174+
</property>
175+
<property name="text">
176+
<string>Copyright 2025 amdilan</string>
177+
</property>
178+
</widget>
160179
</widget>
161180
<resources/>
162181
<connections/>

ui/add_new_title_window.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10+
import app
1011

1112

1213
class Ui_NewTitleDialog(object):
@@ -24,7 +25,7 @@ def setupUi(self, NewTitleDialog):
2425
font.setPointSize(10)
2526
NewTitleDialog.setFont(font)
2627
icon = QtGui.QIcon()
27-
icon.addPixmap(QtGui.QPixmap("ui\\assets/drawer.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
28+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\drawer.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2829
NewTitleDialog.setWindowIcon(icon)
2930
NewTitleDialog.setSizeGripEnabled(False)
3031
NewTitleDialog.setModal(False)
@@ -114,7 +115,7 @@ def setupUi(self, NewTitleDialog):
114115
self.pushButton.setFont(font)
115116
self.pushButton.setText("")
116117
icon1 = QtGui.QIcon()
117-
icon1.addPixmap(QtGui.QPixmap("ui\\assets/add-dev.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
118+
icon1.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\add-dev.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
118119
self.pushButton.setIcon(icon1)
119120
self.pushButton.setObjectName("pushButton")
120121
self.label_5 = QtWidgets.QLabel(parent=NewTitleDialog)

ui/add_new_update_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10-
10+
import app
1111

1212
class Ui_NewUpdateDialog(object):
1313
def setupUi(self, NewUpdateDialog):
@@ -16,7 +16,7 @@ def setupUi(self, NewUpdateDialog):
1616
NewUpdateDialog.setMinimumSize(QtCore.QSize(650, 325))
1717
NewUpdateDialog.setMaximumSize(QtCore.QSize(650, 325))
1818
icon = QtGui.QIcon()
19-
icon.addPixmap(QtGui.QPixmap("ui\\assets/folder.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
19+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\folder.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2020
NewUpdateDialog.setWindowIcon(icon)
2121
self.buttonBox = QtWidgets.QDialogButtonBox(parent=NewUpdateDialog)
2222
self.buttonBox.setGeometry(QtCore.QRect(290, 280, 341, 32))

ui/edit_title_window.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10+
import app
1011

1112

1213
class Ui_EditTitleDialog(object):
@@ -24,7 +25,7 @@ def setupUi(self, EditTitleDialog):
2425
font.setPointSize(10)
2526
EditTitleDialog.setFont(font)
2627
icon = QtGui.QIcon()
27-
icon.addPixmap(QtGui.QPixmap("ui\\assets/drawer.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
28+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\drawer.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2829
EditTitleDialog.setWindowIcon(icon)
2930
EditTitleDialog.setSizeGripEnabled(False)
3031
EditTitleDialog.setModal(False)

ui/edit_update_window.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10+
import app
1011

1112

1213
class Ui_EditUpdateDialog(object):
@@ -16,7 +17,7 @@ def setupUi(self, EditUpdateDialog):
1617
EditUpdateDialog.setMinimumSize(QtCore.QSize(650, 325))
1718
EditUpdateDialog.setMaximumSize(QtCore.QSize(650, 325))
1819
icon = QtGui.QIcon()
19-
icon.addPixmap(QtGui.QPixmap("ui\\assets/folder.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
20+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\folder.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2021
EditUpdateDialog.setWindowIcon(icon)
2122
self.buttonBox = QtWidgets.QDialogButtonBox(parent=EditUpdateDialog)
2223
self.buttonBox.setGeometry(QtCore.QRect(290, 280, 341, 32))

ui/main_window.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
from PyQt6 import QtCore, QtGui, QtWidgets
10+
import app
1011

1112

1213
class Ui_MainWindow(object):
@@ -17,7 +18,7 @@ def setupUi(self, MainWindow):
1718
MainWindow.setMinimumSize(QtCore.QSize(920, 600))
1819
MainWindow.setBaseSize(QtCore.QSize(920, 600))
1920
icon = QtGui.QIcon()
20-
icon.addPixmap(QtGui.QPixmap("ui\\assets/icon.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
21+
icon.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\icon.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
2122
MainWindow.setWindowIcon(icon)
2223
self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
2324
self.centralwidget.setObjectName("centralwidget")
@@ -590,7 +591,7 @@ def setupUi(self, MainWindow):
590591
self.toolButtonRefreshTitle = QtWidgets.QToolButton(parent=self.tab2)
591592
self.toolButtonRefreshTitle.setText("")
592593
icon1 = QtGui.QIcon()
593-
icon1.addPixmap(QtGui.QPixmap("ui\\assets/refresh.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
594+
icon1.addPixmap(QtGui.QPixmap(app.resource_path("ui\\assets\\refresh.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
594595
self.toolButtonRefreshTitle.setIcon(icon1)
595596
self.toolButtonRefreshTitle.setIconSize(QtCore.QSize(18, 18))
596597
self.toolButtonRefreshTitle.setObjectName("toolButtonRefreshTitle")

0 commit comments

Comments
 (0)