From 5cac29f4bd37891dfd3ca762852800033c54a4e4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 28 Oct 2025 19:17:37 +0300 Subject: [PATCH] initial structure --- .gitignore | 5 +++ README.md | 3 ++ icons/afterfx.png | Bin 0 -> 1708 bytes main.py | 4 +++ run.sh | 8 +++++ src/app.py | 17 +++++++++ src/config.py | 8 +++++ src/mainwindow.py | 15 ++++++++ styles/mainwindow.css | 23 +++++++++++++ translations/__init__.py | 1 + translations/en_US.py | 7 ++++ translations/helper.py | 22 ++++++++++++ translations/ru_RU.py | 7 ++++ ui/mainwindow.py | 72 +++++++++++++++++++++++++++++++++++++++ 14 files changed, 192 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 icons/afterfx.png create mode 100644 main.py create mode 100755 run.sh create mode 100644 src/app.py create mode 100644 src/config.py create mode 100644 src/mainwindow.py create mode 100644 styles/mainwindow.css create mode 100644 translations/__init__.py create mode 100644 translations/en_US.py create mode 100644 translations/helper.py create mode 100644 translations/ru_RU.py create mode 100644 ui/mainwindow.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f791c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.cache +.vscode +**/__pycache__ +builddir +.venv diff --git a/README.md b/README.md new file mode 100644 index 0000000..c7d676f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Aegnux + +A convenient way to install Adobe After Effects on Linux using Wine. \ No newline at end of file diff --git a/icons/afterfx.png b/icons/afterfx.png new file mode 100644 index 0000000000000000000000000000000000000000..873527365a00d1728a852fbbc53c927a2a153cba GIT binary patch literal 1708 zcmV;d22=ToP)vwOGOc7diqrG?6?1>0>4ebCaP5+o6c zQ8W+}Oia{}5Mu(yXh@8FF)KoqAtntAR0m+mkTu3*-ToZF-}4jejp zLJi39`6(-25nXzSpp;@&S^e!1oB*r_h=}!!hl=HuWEgtxJJo&?9l?Z}V8j2#(?UEu zhY=Xx7ixm5t;T+L=u1XJBZw%fN^9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vVZ%$Om$OOvlnE zA2)$(z~8{1K#u{807F1uL}(CwcRUp_g67wU<~(8mw*Yg8GJw8+b$`TscM(GK9YS-y zrO^MC@S%xkpfA3s>iiG}#?T{i3m7%eLZ str: + return os.getenv('LANG', 'en_US.UTF-8').split('.')[0] + +def load_strings(): + global STRINGS + + locale = get_current_locale() + + try: + mod = importlib.import_module(f'translations.{locale}') + STRINGS = mod.STRINGS + except: + STRINGS = EN_STRINGS + +def gls(key: str) -> str: + return STRINGS.get(key, key) \ No newline at end of file diff --git a/translations/ru_RU.py b/translations/ru_RU.py new file mode 100644 index 0000000..0c1bad1 --- /dev/null +++ b/translations/ru_RU.py @@ -0,0 +1,7 @@ +STRINGS = { + 'welcome_win_title': 'Aegnux — Добро пожаловать', + 'welcome_to_aegnux': 'Добро пожаловать в Aegnux!', + 'subtitle_text': 'Более простой способ заставить работать After Effects на GNU/Linux', + 'install': 'Установить', + 'footer_text': 'Сделано с любовью 💙 Relative' +} \ No newline at end of file diff --git a/ui/mainwindow.py b/ui/mainwindow.py new file mode 100644 index 0000000..76eef5c --- /dev/null +++ b/ui/mainwindow.py @@ -0,0 +1,72 @@ +from PySide6.QtWidgets import ( + QVBoxLayout, QWidget, + QLabel, QMainWindow, QPushButton, + QSpacerItem, QSizePolicy +) +from PySide6.QtCore import Qt, QSize +from PySide6.QtGui import QIcon, QPixmap +from translations import gls +from src.config import AE_ICON_PATH, STYLES_PATH + +class MainWindowUI(QMainWindow): + def __init__(self): + super().__init__() + self._construct_ui() + self._set_styles() + self.setMinimumSize(480, 600) + + def _set_styles(self): + with open(f'{STYLES_PATH}/mainwindow.css') as fp: + self.setStyleSheet(fp.read()) + + def add_expanding_vertical_sizer(self): + self.root_layout.addItem( + QSpacerItem(1, 2, QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Expanding) + ) + + def _construct_ui(self): + central_widget = QWidget() + self.setCentralWidget(central_widget) + + self.root_layout = QVBoxLayout(central_widget) + + self.add_expanding_vertical_sizer() + + logo_label = QLabel() + logo_pixmap = QPixmap(AE_ICON_PATH) + + logo_label.setPixmap(logo_pixmap) + logo_label.setAlignment(Qt.AlignmentFlag.AlignHCenter) + self.root_layout.addWidget(logo_label) + + title_label = QLabel(gls('welcome_to_aegnux')) + title_label.setObjectName('title_label') + title_label.setAlignment(Qt.AlignmentFlag.AlignHCenter) + + self.root_layout.addWidget(title_label) + + + subtitle_label = QLabel(gls('subtitle_text')) + subtitle_label.setObjectName('subtitle_label') + subtitle_label.setWordWrap(True) + subtitle_label.setAlignment(Qt.AlignmentFlag.AlignHCenter) + + self.root_layout.addWidget(subtitle_label) + + + self.install_button = QPushButton(gls('install')) + self.install_button.setIcon(QIcon.fromTheme('install-symbolic')) + self.install_button.setIconSize(QSize(35, 20)) + self.install_button.setObjectName('install_button') + self.root_layout.addWidget(self.install_button) + + + self.add_expanding_vertical_sizer() + + + footer_label = QLabel(gls('footer_text')) + footer_label.setObjectName('footer_label') + footer_label.setWordWrap(True) + footer_label.setAlignment(Qt.AlignmentFlag.AlignHCenter) + + self.root_layout.addWidget(footer_label) \ No newline at end of file