feat: support layershell close animation
This commit is contained in:
@@ -125,6 +125,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
char *layer_name; // 布局名称
|
||||
int noblur;
|
||||
int noanim;
|
||||
} ConfigLayerRule;
|
||||
|
||||
typedef struct {
|
||||
@@ -1294,6 +1295,7 @@ void parse_config_line(Config *config, const char *line) {
|
||||
// 设置默认值
|
||||
rule->layer_name = NULL;
|
||||
rule->noblur = 0;
|
||||
rule->noanim = 0;
|
||||
|
||||
char *token = strtok(value, ",");
|
||||
while (token != NULL) {
|
||||
@@ -1310,6 +1312,8 @@ void parse_config_line(Config *config, const char *line) {
|
||||
rule->layer_name = strdup(val);
|
||||
} else if (strcmp(key, "noblur") == 0) {
|
||||
rule->noblur = CLAMP_INT(atoi(val), 0, 1);
|
||||
} else if (strcmp(key, "noanim") == 0) {
|
||||
rule->noanim = CLAMP_INT(atoi(val), 0, 1);
|
||||
}
|
||||
}
|
||||
token = strtok(NULL, ",");
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
char *animation_type_open = "slide"; // 是否启用动画 //slide,zoom
|
||||
char *animation_type_close = "slide"; // 是否启用动画 //slide,zoom
|
||||
int animations = 1; // 是否启用动画
|
||||
int layer_animaitons = 1; // 是否启用layer动画
|
||||
int tag_animation_direction = HORIZONTAL; // 标签动画方向
|
||||
int animation_fade_in = 1; // Enable animation fade in
|
||||
int animation_fade_out = 1; // Enable animation fade out
|
||||
@@ -21,7 +22,6 @@ 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_layer = 300; // Animation layer 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}; // 动画曲线
|
||||
|
||||
Reference in New Issue
Block a user