This repository was archived by the owner on Jun 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbout.py
More file actions
70 lines (53 loc) · 2.33 KB
/
Copy pathAbout.py
File metadata and controls
70 lines (53 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import webbrowser
import sys
import platform
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QPixmap
from PyQt6.QtWidgets import (
QPushButton,
QVBoxLayout,
QSpacerItem, QHBoxLayout, QLabel, QSizePolicy, QDialog)
from auratext.Misc.boilerplates import get_appdata_dirs
local_app_data, script_dir = get_appdata_dirs()
class AboutAppDialog(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle("About App")
self.setMinimumSize(400, 300)
self.setWindowFlags(Qt.WindowType.FramelessWindowHint | Qt.WindowType.Window)
self.init_ui()
def init_ui(self):
layout = QVBoxLayout()
# Image at the top
image_label = QLabel()
pixmap = QPixmap(f"{local_app_data}/icons/banner.png")
pixmap = pixmap.scaled(200, 200, aspectRatioMode=Qt.AspectRatioMode.KeepAspectRatioByExpanding)
image_label.setPixmap(pixmap)
image_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
# App description
description = QLabel("Aura Text is a versatile and powerful text editor powered by QScintilla that provides all the necessary tools for developers. It is build using PyQt6 and Python."
"\n" + "\n"
"Version: v5.4.1" + "\n" + "\n" + "\n" + "Made with ❣️ by Rohan Kishore")
description.setWordWrap(True)
description.setAlignment(Qt.AlignmentFlag.AlignCenter)
# Buttons at the bottom
button_layout = QHBoxLayout()
close_button = QPushButton("Close")
learn_more_button = QPushButton("Learn More")
# Add spacers for better layout
spacer = QSpacerItem(20, 40, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
button_layout.addItem(spacer)
button_layout.addWidget(learn_more_button)
button_layout.addWidget(close_button)
button_layout.addItem(spacer)
# Connect button signals
close_button.clicked.connect(self.close)
learn_more_button.clicked.connect(self.learn_more)
# Add widgets to the layout
layout.addWidget(image_label)
layout.addWidget(description)
layout.addLayout(button_layout)
self.setLayout(layout)
def learn_more(self):
webbrowser.open_new_tab("https://github.com/rohankishore/Aura-Text")