4 Commits

Author SHA1 Message Date
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
4 changed files with 34 additions and 7 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

@@ -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)