Skip to content

Commit

Permalink
added about section
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Dec 20, 2023
1 parent a568fd9 commit ce65729
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 5 deletions.
10 changes: 6 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from core import core
from modules.app_selector import AppSelector
from utls import UrlBox, Worker, open_browser
from utls import UrlBox, Worker, open_browser, Ui_about

curr_dir = os.path.dirname(os.path.abspath(__file__))

Expand All @@ -28,9 +28,7 @@ def setupUi(self, *args, **kwargs):
"https://github.com/m-jishnu/alt-app-installer/releases"
)
)
self.actionAbout.triggered.connect(
lambda: open_browser("https://github.com/m-jishnu/alt-app-installer")
)
self.actionAbout.triggered.connect(self.about)
self.actionHelp.triggered.connect(
lambda: open_browser("https://discord.com/invite/9eeN2Wve4T")
)
Expand All @@ -56,6 +54,10 @@ def ignore_All_filters(self):
self.actionIgnore_Latest_Version.setChecked(False)
self.actionIgnore_Latest_Version.setEnabled(True)

def about(self):
window = Ui_about()
window.exec()

def open_Logs(self):
path = f"{curr_dir}/log.txt"
if os.path.exists(path):
Expand Down
135 changes: 134 additions & 1 deletion app/utls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from PyQt6 import QtCore, QtWidgets
from PyQt6.QtCore import QObject, QRunnable, pyqtSignal, pyqtSlot
from PyQt6.QtGui import QIcon, QPixmap
from PyQt6.QtGui import QIcon, QPixmap, QFont
from PyQt6.QtWidgets import QDialog
import os

Expand Down Expand Up @@ -138,3 +138,136 @@ def run(self):

def open_browser(arg):
webbrowser.open(arg)


class Ui_about(QDialog):
def __init__(self):
super().__init__()
self.setupUi(self)

def setupUi(self, about):
about.setObjectName("about")
about.resize(315, 200)
about.setMaximumSize(QtCore.QSize(327, 218))
icon = QIcon()
icon.addPixmap(
QPixmap(f"{curr_dir}/data/images/main.ico"),
QIcon.Mode.Normal,
QIcon.State.Off,
)
about.setWindowIcon(icon)
self.gridLayout = QtWidgets.QGridLayout(about)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_2.addItem(spacerItem)
self.label = QtWidgets.QLabel(parent=about)
font = QFont()
font.setFamily("MS Shell Dlg 2")
font.setPointSize(15)
self.label.setFont(font)
self.label.setObjectName("label")
self.horizontalLayout_2.addWidget(self.label)
spacerItem1 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_2.addItem(spacerItem1)
self.gridLayout.addLayout(self.horizontalLayout_2, 2, 1, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem2 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem2)
self.imagetitle = QtWidgets.QLabel(parent=about)
self.imagetitle.setMaximumSize(QtCore.QSize(90, 90))
self.imagetitle.setText("")
self.imagetitle.setPixmap(QPixmap(f"{curr_dir}/data/images/installer_icon.png"))
self.imagetitle.setScaledContents(True)
self.imagetitle.setObjectName("imagetitle")
self.horizontalLayout.addWidget(self.imagetitle)
spacerItem3 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout.addItem(spacerItem3)
self.gridLayout.addLayout(self.horizontalLayout, 1, 1, 1, 1)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
spacerItem4 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_5.addItem(spacerItem4)
self.label_2 = QtWidgets.QLabel(parent=about)
self.label_2.setObjectName("label_2")
self.horizontalLayout_5.addWidget(self.label_2)
spacerItem5 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_5.addItem(spacerItem5)
self.gridLayout.addLayout(self.horizontalLayout_5, 3, 1, 1, 1)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
spacerItem6 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_6.addItem(spacerItem6)
self.label_3 = QtWidgets.QLabel(parent=about)
font = QFont()
font.setPointSize(10)
self.label_3.setFont(font)
self.label_3.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.label_3.setOpenExternalLinks(True)
self.label_3.setObjectName("label_3")
self.horizontalLayout_6.addWidget(self.label_3)
spacerItem7 = QtWidgets.QSpacerItem(
40,
20,
QtWidgets.QSizePolicy.Policy.Expanding,
QtWidgets.QSizePolicy.Policy.Minimum,
)
self.horizontalLayout_6.addItem(spacerItem7)
self.gridLayout.addLayout(self.horizontalLayout_6, 4, 1, 1, 1)
spacerItem8 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.gridLayout.addItem(spacerItem8, 5, 1, 1, 1)
spacerItem9 = QtWidgets.QSpacerItem(
20,
40,
QtWidgets.QSizePolicy.Policy.Minimum,
QtWidgets.QSizePolicy.Policy.Expanding,
)
self.gridLayout.addItem(spacerItem9, 0, 1, 1, 1)
self.label.setText("Alt App Installer 2.6.8")
self.label_2.setText("© 2022 - 2024 Jishnu M")
urlLink = '<a href="http://github.com/m-jishnu/alt-app-installer" style="text-decoration: none; color: black;">github.com/m-jishnu/alt-app-installer</a>'
self.label_3.setText(urlLink)
self.setWindowTitle("About")
self.label_3.setOpenExternalLinks(True)

0 comments on commit ce65729

Please sign in to comment.