feat: add smooth focus transition animation for opacity and border
This adds animated transitions when switching focus between windows. Both window opacity and border color now fade smoothly using cubic bezier easing instead of changing instantly. Implementation: - Added animation_duration_focus config option (default 400ms) - Added animation_curve_focus for cubic bezier easing curve - Window opacity and border color animate together when focus changes - Uses existing animation infrastructure (baked bezier points) The feature is backwards compatible and can be disabled by setting animation_duration_focus=0 in config file. Changes affect 5 files with minimal additions to keep code clean.
This commit is contained in:
@@ -25,10 +25,12 @@ uint32_t animation_duration_move = 500; // Animation move speed
|
||||
uint32_t animation_duration_open = 400; // Animation open speed
|
||||
uint32_t animation_duration_tag = 300; // Animation tag speed
|
||||
uint32_t animation_duration_close = 300; // Animation close speed
|
||||
uint32_t animation_duration_focus = 400; // Animation focus opacity speed
|
||||
double animation_curve_move[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
|
||||
double animation_curve_open[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
|
||||
double animation_curve_tag[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
|
||||
double animation_curve_close[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
|
||||
double animation_curve_focus[4] = {0.08, 0.82, 0.17, 1}; // 动画曲线
|
||||
|
||||
/* appearance */
|
||||
unsigned int axis_bind_apply_timeout = 100; // 滚轮绑定动作的触发的时间间隔
|
||||
|
||||
Reference in New Issue
Block a user