fixed a bunch of stuff, added a notes programm, which lets you take notes, did some giant refactoring work and did some general designing

This commit is contained in:
2025-11-24 14:01:15 +01:00
parent 3cd75d97f6
commit 5fd77f4b39
12 changed files with 1768 additions and 866 deletions

57
src/AboutDialog.py Normal file
View File

@@ -0,0 +1,57 @@
import wx
import sys
import os
def get_resource_path(relative_path):
"""Get absolute path to resource, works for dev and for PyInstaller"""
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
class AboutDialog(wx.Dialog):
def __init__(self, parent):
super().__init__(parent, title="About wxIRC Client", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
sizer = wx.BoxSizer(wx.VERTICAL)
icon_path = get_resource_path("icon.ico")
icon_bitmap = wx.Bitmap(icon_path, wx.BITMAP_TYPE_ICO)
icon_ctrl = wx.StaticBitmap(self, bitmap=icon_bitmap)
# Add the icon to the sizer
sizer.Add(icon_ctrl, 0, wx.ALL | wx.ALIGN_CENTER, 10)
# Application info
info_text = wx.StaticText(self, label="wxIRC Client")
info_font = wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)
info_text.SetFont(info_font)
version_text = wx.StaticText(self, label="V 1.1.1.0")
version_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
version_text.SetFont(version_font)
contrubutors_text = wx.StaticText(self, label="MiT License")
contrubutors_font = wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
contrubutors_text.SetFont(contrubutors_font)
# Add info to sizer
sizer.Add(info_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
sizer.Add(version_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
sizer.Add(contrubutors_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
# OK button
ok_btn = wx.Button(self, wx.ID_OK, "OK")
ok_btn.SetDefault()
btn_sizer = wx.BoxSizer(wx.HORIZONTAL)
btn_sizer.Add(ok_btn, 0, wx.ALIGN_CENTER | wx.ALL, 10)
sizer.Add(btn_sizer, 0, wx.ALIGN_CENTER)
self.SetSizer(sizer)
self.Fit()
self.Centre()