]> Softwares of Agnibho - medscript.git/commitdiff
MainWindow Icons
authorAgnibho Mondal <mondal@agnibho.com>
Fri, 8 Sep 2023 17:58:41 +0000 (23:28 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Fri, 8 Sep 2023 17:58:41 +0000 (23:28 +0530)
renderbox.py
setting.py
viewbox.py
window.py

index 124233e6da94b746452911a0618f31f599371fe2..990c25adeb2a8a7e74420c9f1237e9761b07b521 100644 (file)
@@ -7,7 +7,7 @@
 
 from PyQt6.QtWidgets import QMainWindow, QToolBar, QFileDialog
 from PyQt6.QtWebEngineWidgets import QWebEngineView
-from PyQt6.QtGui import QAction
+from PyQt6.QtGui import QAction, QIcon
 from PyQt6.QtCore import QUrl
 import os, webbrowser
 
@@ -41,6 +41,7 @@ class RenderBox(QMainWindow):
         self.webview=QWebEngineView()
 
         self.setCentralWidget(self.webview)
+        self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
 
     def update(self, file):
         try:
index 307a7adb8120d2f31d22c0e997578808a84f9410..b50c7c9a50e4912cc7f4bed6b9e99ac9adb772d2 100644 (file)
@@ -6,7 +6,8 @@
 # You should have received a copy of the GNU General Public License along with MedScript. If not, see <https://www.gnu.org/licenses/>.
 
 from PyQt6.QtWidgets import QWidget, QMainWindow, QFormLayout, QPushButton, QLabel, QLineEdit, QTextEdit, QStatusBar, QMessageBox
-import json
+from PyQt6.QtGui import QIcon
+import os, json
 from config import config
 
 class EditPrescriber(QMainWindow):
@@ -75,5 +76,6 @@ class EditPrescriber(QMainWindow):
         self.setStatusBar(self.statusbar)
 
         self.setCentralWidget(widget)
+        self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
 
         self.load()
index f6fa3d32d92295d875d9168b253da196f7e8c6c9..6aaa2ed54209c5f3ddc2a7ac55b14ba68e774c65 100644 (file)
@@ -9,6 +9,7 @@ import os
 from PyQt6.QtWidgets import QMainWindow
 from PyQt6.QtWebEngineWidgets import QWebEngineView
 from PyQt6.QtCore import QUrl
+from PyQt6.QtGui import QIcon
 
 class ViewBox(QMainWindow):
     def __init__(self, *args, **kwargs):
@@ -20,6 +21,8 @@ class ViewBox(QMainWindow):
         self.webview=QWebEngineView()
 
         self.setCentralWidget(self.webview)
+        self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
+
 
     def open(self, file):
         self.webview.load(QUrl("file:///"+os.path.abspath(file).replace(os.sep, "/")))
index e9dcd9dcc1f7b8408941ac9e44472d22f76b61d1..3c3d6112a315f00169db9984dde8970d563089f4 100644 (file)
--- a/window.py
+++ b/window.py
@@ -93,7 +93,7 @@ class MainWindow(QMainWindow):
         if(self.save_state==md5(self.prescription.get_json().encode()).hexdigest()):
             target=self.renderer.render(self.current_file.directory.name)
             self.signal_view.emit(target)
-            self.renderbox.show()
+            self.renderbox.showMaximized()
         else:
            QMessageBox.information(self,"Save first", "Please save the file before rendering.")
 
@@ -554,4 +554,5 @@ class MainWindow(QMainWindow):
             self.cmd_open(config["filename"])
         else:
             self.cmd_new()
-        self.show()
+        self.setWindowIcon(QIcon(os.path.join("resource", "icon_medscript.ico")))
+        self.showMaximized()