chore(documentation): chore card_animation_type

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-08-28 10:53:01 +05:00
parent 8f54f4814c
commit 38ab4acc86
2 changed files with 191 additions and 91 deletions

View File

@@ -52,102 +52,152 @@ The `GAME_CARD_ANIMATION` dictionary controls all animation parameters for game
```python ```python
GAME_CARD_ANIMATION = { GAME_CARD_ANIMATION = {
# Type of animation when entering and exiting the detail page # Type of animation when entering or exiting the detail page
# Possible values: "fade", "slide_left", "slide_right", "slide_up", "slide_down", "bounce" # Possible values: "fade", "slide_left", "slide_right", "slide_up", "slide_down", "bounce"
# Determines how the detail page appears and disappears
"detail_page_animation_type": "fade", "detail_page_animation_type": "fade",
# Border width of the card in idle state (no hover or focus). # Border width of the card in idle state (no hover or focus)
# Affects the thickness of the border when the card is not highlighted. # Affects the thickness of the border around the card when it's not selected
# Value in pixels. # Value in pixels
"default_border_width": 2, "default_border_width": 2,
# Border width on hover. # Border width on hover
# Increases the border thickness when the cursor is over the card. # Increases the border thickness when the cursor is over the card
# Value in pixels. # Value in pixels
"hover_border_width": 8, "hover_border_width": 8,
# Border width on focus (e.g., selected via keyboard). # Border width on focus (e.g., when selected via keyboard)
# Increases the border thickness when the card is focused. # Increases the border thickness when the card is focused
# Value in pixels. # Value in pixels
"focus_border_width": 12, "focus_border_width": 12,
# Minimum border width during pulsing animation. # Minimum border width during pulsing animation
# Sets the minimum border thickness during the "breathing" animation. # Determines the minimum border thickness during the "breathing" animation
# Value in pixels. # Value in pixels
"pulse_min_border_width": 8, "pulse_min_border_width": 8,
# Maximum border width during pulsing animation. # Maximum border width during pulsing animation
# Sets the maximum border thickness during pulsing. # Determines the maximum border thickness during pulsing
# Value in pixels. # Value in pixels
"pulse_max_border_width": 10, "pulse_max_border_width": 10,
# Duration of the border thickness animation (e.g., on hover or focus). # Duration of the border thickness animation (e.g., on hover or focus)
# Affects the speed of transition between different border widths. # Affects the speed of transition from one border width to another
# Value in milliseconds. # Value in milliseconds
"thickness_anim_duration": 300, "thickness_anim_duration": 300,
# Duration of one pulsing animation cycle. # Duration of one pulsing animation cycle
# Defines how fast the border "pulses" between min and max values. # Determines how fast the border "pulses" between min and max values
# Value in milliseconds. # Value in milliseconds
"pulse_anim_duration": 800, "pulse_anim_duration": 800,
# Duration of the gradient rotation animation. # Duration of the gradient rotation animation
# Affects how fast the gradient border rotates around the card. # Affects how fast the gradient border rotates around the card
# Value in milliseconds. # Value in milliseconds
"gradient_anim_duration": 3000, "gradient_anim_duration": 3000,
# Starting angle of the gradient (in degrees). # Starting angle of the gradient (in degrees)
# Defines the initial rotation point of the gradient when the animation starts. # Determines the initial rotation point of the gradient at animation start
"gradient_start_angle": 360, "gradient_start_angle": 360,
# Ending angle of the gradient (in degrees). # Ending angle of the gradient (in degrees)
# Defines the end rotation point of the gradient. # Determines the final rotation point of the gradient
# A value of 0 means a full 360-degree rotation. # Value 0 means a full 360° rotation
"gradient_end_angle": 0, "gradient_end_angle": 0,
# Easing curve type for border expansion animation (on hover/focus). # Type of card animation on hover or focus
# Affects the "feel" of the animation (e.g., smooth acceleration or deceleration). # Possible values: "gradient", "scale"
# Possible values: strings corresponding to QEasingCurve.Type (e.g., "OutBack", "InOutQuad"). # "scale" is unstable and requires adjustments (use at your own risk)
# "gradient" enables a rotating gradient for the border, "scale" enlarges the card
"card_animation_type": "gradient",
# Card scale in idle state
# Determines the base size of the card (1.0 = 100% of original size)
# Value as a fraction (e.g., 1.0 for normal size)
"default_scale": 1.0,
# Card scale on hover
# Increases the card size on hover
# Value as a fraction (e.g., 1.1 = 110% of original size)
"hover_scale": 1.1,
# Card scale on focus (e.g., when selected via keyboard)
# Increases the card size on focus
# Value as a fraction (e.g., 1.05 = 105% of original size)
"focus_scale": 1.05,
# Duration of scale animation
# Affects how fast the card changes size on hover or focus
# Value in milliseconds
"scale_anim_duration": 200,
# Easing curve type for border thickness increase animation (on hover/focus)
# Affects the "feel" of the animation (e.g., smooth acceleration or deceleration)
# Possible values: strings corresponding to QEasingCurve.Type (e.g., "OutBack", "InOutQuad")
"thickness_easing_curve": "OutBack", "thickness_easing_curve": "OutBack",
# Easing curve type for border contraction animation (on mouse leave/focus loss). # Easing curve type for border thickness decrease animation (on hover/focus exit)
# Affects the "feel" of returning to the original border width. # Affects the "feel" of returning to the default border width
"thickness_easing_curve_out": "InBack", "thickness_easing_curve_out": "InBack",
# Gradient colors for the animated border. # Easing curve type for scale increase animation (on hover/focus)
# A list of dictionaries where each defines a position (0.01.0) and color in hex format. # Affects the "feel" of the scaling animation (e.g., with a "bounce" effect)
# Affects the appearance of the border on hover or focus. # Possible values: strings corresponding to QEasingCurve.Type
"scale_easing_curve": "OutBack",
# Easing curve type for scale decrease animation (on hover/focus exit)
# Affects the "feel" of returning to the original scale
"scale_easing_curve_out": "InBack",
# Gradient colors for animated border
# List of dictionaries, each specifying position (0.01.0) and color in hex format
# Affects the appearance of the border on hover or focus if card_animation_type="gradient"
"gradient_colors": [ "gradient_colors": [
{"position": 0, "color": "#00fff5"}, # Start color (cyan) {"position": 0, "color": "#00fff5"}, # Starting color (cyan)
{"position": 0.33, "color": "#FF5733"}, # 33% color (orange) {"position": 0.33, "color": "#FF5733"}, # Color at 33% (orange)
{"position": 0.66, "color": "#9B59B6"}, # 66% color (purple) {"position": 0.66, "color": "#9B59B6"}, # Color at 66% (purple)
{"position": 1, "color": "#00fff5"} # End color (back to cyan) {"position": 1, "color": "#00fff5"} # Ending color (back to cyan)
], ],
# Duration of the fade animation when entering the detail page # Duration of fade animation when entering the detail page
# Affects the speed of page appearance with fade animation
# Value in milliseconds
"detail_page_fade_duration": 350, "detail_page_fade_duration": 350,
# Duration of the slide animation when entering the detail page # Duration of slide animation when entering the detail page
# Affects the speed of page sliding animation
# Value in milliseconds
"detail_page_slide_duration": 500, "detail_page_slide_duration": 500,
# Duration of the bounce animation when entering the detail page # Duration of bounce animation when entering the detail page
# Affects the speed of page "bounce" animation
# Value in milliseconds
"detail_page_bounce_duration": 400, "detail_page_bounce_duration": 400,
# Duration of the fade animation when exiting the detail page # Duration of fade animation when exiting the detail page
# Affects the speed of page disappearance with fade animation
# Value in milliseconds
"detail_page_fade_duration_exit": 350, "detail_page_fade_duration_exit": 350,
# Duration of the slide animation when exiting the detail page # Duration of slide animation when exiting the detail page
# Affects the speed of page sliding animation
# Value in milliseconds
"detail_page_slide_duration_exit": 500, "detail_page_slide_duration_exit": 500,
# Duration of the bounce animation when exiting the detail page # Duration of bounce animation when exiting the detail page
# Affects the speed of page "compression" animation
# Value in milliseconds
"detail_page_bounce_duration_exit": 400, "detail_page_bounce_duration_exit": 400,
# Easing curve type for animation when entering the detail page # Easing curve type for animations when entering the detail page
# Applies to slide and bounce animations # Applied to slide and bounce animations; affects the "feel" of movement
# Possible values: strings corresponding to QEasingCurve.Type
"detail_page_easing_curve": "OutCubic", "detail_page_easing_curve": "OutCubic",
# Easing curve type for animation when exiting the detail page # Easing curve type for animations when exiting the detail page
# Applies to slide and bounce animations # Applied to slide and bounce animations; affects the "feel" of movement
# Possible values: strings corresponding to QEasingCurve.Type
"detail_page_easing_curve_exit": "InCubic" "detail_page_easing_curve_exit": "InCubic"
} }
``` ```

View File

@@ -54,69 +54,105 @@ def custom_button_style(color1, color2):
GAME_CARD_ANIMATION = { GAME_CARD_ANIMATION = {
# Тип анимации при входе и выходе на детальную страницу # Тип анимации при входе и выходе на детальную страницу
# Возможные значения: "fade", "slide_left", "slide_right", "slide_up", "slide_down", "bounce" # Возможные значения: "fade", "slide_left", "slide_right", "slide_up", "slide_down", "bounce"
# Определяет, как детальная страница появляется и исчезает
"detail_page_animation_type": "fade", "detail_page_animation_type": "fade",
# Ширина обводки карточки в состоянии покоя (без наведения или фокуса). # Ширина обводки карточки в состоянии покоя (без наведения или фокуса)
# Влияет на толщину рамки вокруг карточки, когда она не выделена. # Влияет на толщину рамки вокруг карточки, когда она не выделена
# Значение в пикселях. # Значение в пикселях
"default_border_width": 2, "default_border_width": 2,
# Ширина обводки при наведении курсора. # Ширина обводки при наведении курсора
# Увеличивает толщину рамки, когда курсор находится над карточкой. # Увеличивает толщину рамки, когда курсор находится над карточкой
# Значение в пикселях. # Значение в пикселях
"hover_border_width": 8, "hover_border_width": 8,
# Ширина обводки при фокусе (например, при выборе с клавиатуры). # Ширина обводки при фокусе (например, при выборе с клавиатуры)
# Увеличивает толщину рамки, когда карточка в фокусе. # Увеличивает толщину рамки, когда карточка в фокусе
# Значение в пикселях. # Значение в пикселях
"focus_border_width": 12, "focus_border_width": 12,
# Минимальная ширина обводки во время пульсирующей анимации. # Минимальная ширина обводки во время пульсирующей анимации
# Определяет минимальную толщину рамки при пульсации (анимация "дыхания"). # Определяет минимальную толщину рамки при пульсации (анимация "дыхания")
# Значение в пикселях. # Значение в пикселях
"pulse_min_border_width": 8, "pulse_min_border_width": 8,
# Максимальная ширина обводки во время пульсирующей анимации. # Максимальная ширина обводки во время пульсирующей анимации
# Определяет максимальную толщину рамки при пульсации. # Определяет максимальную толщину рамки при пульсации
# Значение в пикселях. # Значение в пикселях
"pulse_max_border_width": 10, "pulse_max_border_width": 10,
# Длительность анимации изменения толщины обводки (например, при наведении или фокусе). # Длительность анимации изменения толщины обводки (например, при наведении или фокусе)
# Влияет на скорость перехода от одной ширины обводки к другой. # Влияет на скорость перехода от одной ширины обводки к другой
# Значение в миллисекундах. # Значение в миллисекундах
"thickness_anim_duration": 300, "thickness_anim_duration": 300,
# Длительность одного цикла пульсирующей анимации. # Длительность одного цикла пульсирующей анимации
# Определяет, как быстро рамка "пульсирует" между min и max значениями. # Определяет, как быстро рамка "пульсирует" между min и max значениями
# Значение в миллисекундах. # Значение в миллисекундах
"pulse_anim_duration": 800, "pulse_anim_duration": 800,
# Длительность анимации вращения градиента. # Длительность анимации вращения градиента
# Влияет на скорость, с которой градиентная обводка вращается вокруг карточки. # Влияет на скорость, с которой градиентная обводка вращается вокруг карточки
# Значение в миллисекундах. # Значение в миллисекундах
"gradient_anim_duration": 3000, "gradient_anim_duration": 3000,
# Начальный угол градиента (в градусах). # Начальный угол градиента (в градусах)
# Определяет начальную точку вращения градиента при старте анимации. # Определяет начальную точку вращения градиента при старте анимации
"gradient_start_angle": 360, "gradient_start_angle": 360,
# Конечный угол градиента (в градусах). # Конечный угол градиента (в градусах)
# Определяет конечную точку вращения градиента. # Определяет конечную точку вращения градиента
# Значение 0 означает полный поворот на 360 градусов. # Значение 0 означает полный поворот на 360 градусов
"gradient_end_angle": 0, "gradient_end_angle": 0,
# Тип кривой сглаживания для анимации увеличения обводки (при наведении/фокусе). # Тип анимации для карточки при наведении или фокусе
# Влияет на "чувство" анимации (например, плавное ускорение или замедление). # Возможные значения: "gradient", "scale"
# Возможные значения: строки, соответствующие QEasingCurve.Type (например, "OutBack", "InOutQuad"). # scale крайне нестабилен и требует доработки (используйте на свой страх и риск)
# "gradient" включает вращающийся градиент для обводки, "scale" увеличивает размер карточки
"card_animation_type": "gradient",
# Масштаб карточки в состоянии покоя
# Определяет базовый размер карточки (1.0 = 100% от исходного размера)
# Значение в долях (например, 1.0 для нормального размера)
"default_scale": 1.0,
# Масштаб карточки при наведении курсора
# Увеличивает размер карточки при наведении
# Значение в долях (например, 1.1 = 110% от исходного размера)
"hover_scale": 1.1,
# Масштаб карточки при фокусе (например, при выборе с клавиатуры)
# Увеличивает размер карточки при фокусе
# Значение в долях (например, 1.05 = 105% от исходного размера)
"focus_scale": 1.05,
# Длительность анимации масштабирования
# Влияет на скорость изменения размера карточки при наведении или фокусе
# Значение в миллисекундах
"scale_anim_duration": 200,
# Тип кривой сглаживания для анимации увеличения обводки (при наведении/фокусе)
# Влияет на "чувство" анимации (например, плавное ускорение или замедление)
# Возможные значения: строки, соответствующие QEasingCurve.Type (например, "OutBack", "InOutQuad")
"thickness_easing_curve": "OutBack", "thickness_easing_curve": "OutBack",
# Тип кривой сглаживания для анимации уменьшения обводки (при уходе курсора/потере фокуса). # Тип кривой сглаживания для анимации уменьшения обводки (при уходе курсора/потере фокуса)
# Влияет на "чувство" возврата к исходной ширине обводки. # Влияет на "чувство" возврата к исходной ширине обводки
"thickness_easing_curve_out": "InBack", "thickness_easing_curve_out": "InBack",
# Цвета градиента для анимированной обводки. # Тип кривой сглаживания для анимации увеличения масштаба (при наведении/фокусе)
# Список словарей, где каждый словарь задает позицию (0.01.0) и цвет в формате hex. # Влияет на "чувство" анимации масштабирования (например, с эффектом "отскока")
# Влияет на внешний вид обводки при наведении или фокусе. # Возможные значения: строки, соответствующие QEasingCurve.Type
"scale_easing_curve": "OutBack",
# Тип кривой сглаживания для анимации уменьшения масштаба (при уходе курсора/потере фокуса)
# Влияет на "чувство" возврата к исходному масштабу
"scale_easing_curve_out": "InBack",
# Цвета градиента для анимированной обводки
# Список словарей, где каждый словарь задает позицию (0.01.0) и цвет в формате hex
# Влияет на внешний вид обводки при наведении или фокусе, если card_animation_type="gradient"
"gradient_colors": [ "gradient_colors": [
{"position": 0, "color": "#00fff5"}, # Начальный цвет (циан) {"position": 0, "color": "#00fff5"}, # Начальный цвет (циан)
{"position": 0.33, "color": "#FF5733"}, # Цвет на 33% (оранжевый) {"position": 0.33, "color": "#FF5733"}, # Цвет на 33% (оранжевый)
@@ -125,29 +161,43 @@ GAME_CARD_ANIMATION = {
], ],
# Длительность анимации fade при входе на детальную страницу # Длительность анимации fade при входе на детальную страницу
# Влияет на скорость появления страницы при fade-анимации
# Значение в миллисекундах
"detail_page_fade_duration": 350, "detail_page_fade_duration": 350,
# Длительность анимации slide при входе на детальную страницу # Длительность анимации slide при входе на детальную страницу
# Влияет на скорость скольжения страницы при slide-анимации
# Значение в миллисекундах
"detail_page_slide_duration": 500, "detail_page_slide_duration": 500,
# Длительность анимации bounce при входе на детальную страницу # Длительность анимации bounce при входе на детальную страницу
# Влияет на скорость "прыжка" страницы при bounce-анимации
# Значение в миллисекундах
"detail_page_bounce_duration": 400, "detail_page_bounce_duration": 400,
# Длительность анимации fade при выходе из детальной страницы # Длительность анимации fade при выходе из детальной страницы
# Влияет на скорость исчезновения страницы при fade-анимации
# Значение в миллисекундах
"detail_page_fade_duration_exit": 350, "detail_page_fade_duration_exit": 350,
# Длительность анимации slide при выходе из детальной страницы # Длительность анимации slide при выходе из детальной страницы
# Влияет на скорость скольжения страницы при slide-анимации
# Значение в миллисекундах
"detail_page_slide_duration_exit": 500, "detail_page_slide_duration_exit": 500,
# Длительность анимации bounce при выходе из детальной страницы # Длительность анимации bounce при выходе из детальной страницы
# Влияет на скорость "сжатия" страницы при bounce-анимации
# Значение в миллисекундах
"detail_page_bounce_duration_exit": 400, "detail_page_bounce_duration_exit": 400,
# Тип кривой сглаживания для анимации при входе на детальную страницу # Тип кривой сглаживания для анимации при входе на детальную страницу
# Применяется к slide и bounce анимациям # Применяется к slide и bounce анимациям, влияет на "чувство" движения
# Возможные значения: строки, соответствующие QEasingCurve.Type
"detail_page_easing_curve": "OutCubic", "detail_page_easing_curve": "OutCubic",
# Тип кривой сглаживания для анимации при выходе из детальной страницы # Тип кривой сглаживания для анимации при выходе из детальной страницы
# Применяется к slide и bounce анимациям # Применяется к slide и bounce анимациям, влияет на "чувство" движения
# Возможные значения: строки, соответствующие QEasingCurve.Type
"detail_page_easing_curve_exit": "InCubic" "detail_page_easing_curve_exit": "InCubic"
} }
``` ```