Compare commits

6 Commits

Author SHA1 Message Date
6a66f37ba1 fix: fix open context menu on gamepad
All checks were successful
Code check / Check code (push) Successful in 1m24s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-25 12:22:24 +05:00
4db1cce32c chore(changelog): update
All checks were successful
Code check / Check code (push) Successful in 1m29s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-25 11:44:43 +05:00
edaeca4f11 feat: set focus on first item of context menu
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-25 11:39:40 +05:00
11d44f091d fix(egs): prevent legendary list call when user.json is missing
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-25 11:32:14 +05:00
09d9c6510a chore: reduced duration of card opening animation
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-25 11:13:54 +05:00
272be51bb0 feat(dev-script): added appimage cleaner script
All checks were successful
Build Check - AppImage, Arch, Fedora / Build AppImage (pull_request) Successful in 2m22s
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (41) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (rawhide) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora / Build Arch Package (pull_request) Has been skipped
Code check / Check code (push) Successful in 1m28s
Build Check - AppImage, Arch, Fedora / changes (pull_request) Successful in 28s
Code check / Check code (pull_request) Successful in 1m32s
Build Check - AppImage, Arch, Fedora / Build Fedora RPM (42) (pull_request) Has been skipped
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-22 14:17:16 +05:00
5 changed files with 54 additions and 46 deletions

View File

@ -3,6 +3,23 @@
Все заметные изменения в этом проекте фиксируются в этом файле. Все заметные изменения в этом проекте фиксируются в этом файле.
Формат основан на [Keep a Changelog](https://keepachangelog.com/) и придерживается принципов [Semantic Versioning](https://semver.org/). Формат основан на [Keep a Changelog](https://keepachangelog.com/) и придерживается принципов [Semantic Versioning](https://semver.org/).
## [Unreleased]
### Added
### Changed
- Уменьшена длительность анимации открытия карточки с 800 до 350мс
- Контекстное меню при открытие теперь сразу фокусируется на первом элементе
### Fixed
- legendary list теперь не вызывается если вход в EGS не был произведён
### Contributors
---
## [0.1.4] - 2025-07-21 ## [0.1.4] - 2025-07-21
### Added ### Added

View File

@ -33,7 +33,7 @@ class PySide6DependencyAnalyzer:
"""Находит все Python файлы в директории""" """Находит все Python файлы в директории"""
python_files = [] python_files = []
for root, dirs, files in os.walk(directory): for root, dirs, files in os.walk(directory):
dirs[:] = [d for d in dirs if d not in {'.venv', '__pycache__', '.git', 'node_modules'}] dirs[:] = [d for d in dirs if d not in {'.venv', '__pycache__', '.git'}]
for file in files: for file in files:
if file.endswith('.py'): if file.endswith('.py'):
@ -44,27 +44,11 @@ class PySide6DependencyAnalyzer:
"""Находит все PySide6 библиотеки (.so файлы)""" """Находит все PySide6 библиотеки (.so файлы)"""
libs = {} libs = {}
# Поиск в разных возможных локациях # Поиск в единственной локации
search_paths = [ search_path = Path("../.venv/lib/python3.10/site-packages/PySide6")
base_path / "usr/local/lib/python3.10/dist-packages/PySide6",
base_path / "usr/local/lib/python3.11/dist-packages/PySide6",
base_path / "usr/lib/python3/dist-packages/PySide6",
base_path / ".venv/lib/python3.10/site-packages/PySide6",
base_path / ".venv/lib/python3.11/site-packages/PySide6",
]
# Также добавляем путь, если PySide6 установлен системно
try:
import PySide6
system_path = Path(PySide6.__file__).parent
search_paths.append(system_path)
except ImportError:
pass
for search_path in search_paths:
if search_path.exists():
print(f"Поиск PySide6 библиотек в: {search_path}") print(f"Поиск PySide6 библиотек в: {search_path}")
if search_path.exists():
# Ищем .so файлы модулей # Ищем .so файлы модулей
for so_file in search_path.glob("Qt*.*.so"): for so_file in search_path.glob("Qt*.*.so"):
module_name = so_file.stem.split('.')[0] # QtCore.abi3.so -> QtCore module_name = so_file.stem.split('.')[0] # QtCore.abi3.so -> QtCore
@ -79,9 +63,6 @@ class PySide6DependencyAnalyzer:
libs[subdir.name] = so_file libs[subdir.name] = so_file
break break
if libs:
break
return libs return libs
def analyze_ldd_dependencies(self, lib_path: Path) -> Set[str]: def analyze_ldd_dependencies(self, lib_path: Path) -> Set[str]:
@ -366,13 +347,13 @@ def main():
print(f"\nПотенциальная экономия места: {results['analysis_summary']['space_saving_potential']}") print(f"\nПотенциальная экономия места: {results['analysis_summary']['space_saving_potential']}")
if args.verbose and results['real_dependencies']: if args.verbose and results['real_dependencies']:
print(f"\nРеальные зависимости (ldd):") Devlin(f"\nРеальные зависимости (ldd):")
for module, deps in results['real_dependencies'].items(): for module, deps in results['real_dependencies'].items():
if deps: if deps:
print(f" {module}{', '.join(deps)}") print(f" {module}{', '.join(deps)}")
# Обновляем AppImage рецепт # Обновляем AppImage рецепт
recipe_path = project_path / "../build-aux/AppImageBuilder.yml" recipe_path = Path("../build-aux/AppImageBuilder.yml")
if recipe_path.exists(): if recipe_path.exists():
updated_recipe = analyzer.generate_appimage_recipe(results['removable'], recipe_path) updated_recipe = analyzer.generate_appimage_recipe(results['removable'], recipe_path)
if updated_recipe: if updated_recipe:

View File

@ -280,6 +280,11 @@ class ContextMenuManager:
) )
) )
# Устанавливаем фокус на первый элемент меню
actions = menu.actions()
if actions:
menu.setActiveAction(actions[0])
menu.exec(game_card.mapToGlobal(pos)) menu.exec(game_card.mapToGlobal(pos))
def _launch_game(self, game_card): def _launch_game(self, game_card):

View File

@ -747,6 +747,11 @@ def _continue_loading_egs_games(legendary_path: str, callback: Callable[[list[tu
games: list[tuple] = [] games: list[tuple] = []
cache_dir.mkdir(parents=True, exist_ok=True) cache_dir.mkdir(parents=True, exist_ok=True)
user_json_path = cache_dir / "user.json"
if not user_json_path.exists():
callback(games)
return
def process_games(installed_games: list | None): def process_games(installed_games: list | None):
if installed_games is None: if installed_games is None:
logger.info("No installed Epic Games Store games found") logger.info("No installed Epic Games Store games found")
@ -855,12 +860,12 @@ def _continue_loading_egs_games(legendary_path: str, callback: Callable[[list[tu
app_name, app_name,
f"legendary:launch:{app_name}", f"legendary:launch:{app_name}",
"", "",
last_launch, # Время последнего запуска last_launch,
formatted_playtime, # Форматированное время игры formatted_playtime,
protondb_tier, # ProtonDB tier protondb_tier,
status or "", status or "",
last_launch_timestamp, # Временная метка последнего запуска last_launch_timestamp,
playtime_seconds, # Время игры в секундах playtime_seconds,
"epic" "epic"
) )
pending_images -= 1 pending_images -= 1
@ -880,7 +885,7 @@ def _continue_loading_egs_games(legendary_path: str, callback: Callable[[list[tu
get_protondb_tier_async(steam_appid, on_protondb_tier) get_protondb_tier_async(steam_appid, on_protondb_tier)
else: else:
logger.debug(f"No Steam app found for EGS game {title}") logger.debug(f"No Steam app found for EGS game {title}")
on_protondb_tier("") # Proceed with empty ProtonDB tier on_protondb_tier("")
get_steam_apps_and_index_async(on_steam_apps) get_steam_apps_and_index_async(on_steam_apps)

View File

@ -1883,7 +1883,7 @@ class MainWindow(QMainWindow):
opacityEffect = QGraphicsOpacityEffect(detailPage) opacityEffect = QGraphicsOpacityEffect(detailPage)
detailPage.setGraphicsEffect(opacityEffect) detailPage.setGraphicsEffect(opacityEffect)
animation = QPropertyAnimation(opacityEffect, QByteArray(b"opacity")) animation = QPropertyAnimation(opacityEffect, QByteArray(b"opacity"))
animation.setDuration(800) animation.setDuration(350)
animation.setStartValue(0) animation.setStartValue(0)
animation.setEndValue(1) animation.setEndValue(1)
animation.start(QAbstractAnimation.DeletionPolicy.DeleteWhenStopped) animation.start(QAbstractAnimation.DeletionPolicy.DeleteWhenStopped)