Skip to content

Commit

Permalink
Improve gui
Browse files Browse the repository at this point in the history
  • Loading branch information
yngwi committed Oct 2, 2024
1 parent e7b1eb9 commit 2009890
Show file tree
Hide file tree
Showing 7 changed files with 444 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build executable with PyInstaller
run: |
pyinstaller --onefile --windowed --icon=resources/icon.ico --add-data "resources/icon.ico;resources" matricula-convert.py
pyinstaller --onefile --windowed --icon=resources/icon.ico --add-data "resources/logo.png;resources" --add-data "resources/icon.ico;resources" matricula-convert.py
- name: Package executable and README into zip
run: |
Expand Down
2 changes: 1 addition & 1 deletion matricula-convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MainWindow()
window.resize(640, 480)
window.resize(600, 800)
window.show()
sys.exit(app.exec())
31 changes: 31 additions & 0 deletions modules/gui/log_window.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import (
QDialog,
QTextEdit,
QVBoxLayout,
)

from modules.gui.ui_helper import UIHelper


class LogWindow(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
self.ui_helper = UIHelper(self)
self.setWindowTitle("Conversion Log")

icon_path = self.ui_helper.get_resource_path("icon.ico")
self.setWindowIcon(QIcon(icon_path))
self.setMinimumSize(600, 400)

layout = QVBoxLayout(self)
self.log_text = QTextEdit(self)
self.log_text.setReadOnly(True)
layout.addWidget(self.log_text)

close_button = self.ui_helper.create_button("Close")
close_button.clicked.connect(self.close)
layout.addWidget(close_button)

def append_log(self, message: str):
self.log_text.append(message)
Loading

0 comments on commit 2009890

Please sign in to comment.