【发布时间】:2021-01-22 13:15:29
【问题描述】:
我有一个原生genlist,项目样式为1text。
当文本长于显示时,这种样式可以滚动,但是如何控制速度?我希望它滚动得更快。
谢谢。
【问题讨论】:
我有一个原生genlist,项目样式为1text。
当文本长于显示时,这种样式可以滚动,但是如何控制速度?我希望它滚动得更快。
谢谢。
【问题讨论】:
Let's figure out how to change the text scroll speed.
The native genlist 1text style edc is implemented in the file below.
Project profile/wearable/platform/core/uifw/efl-theme-tizen-wearable/wearable-circle/widgets/genlist.edc
Branch : tizen
textblock { "elm.text"; scale;
desc { "default";
rel1 {
relative: 1.0 1.0;
to_x: "elm.padding.icon";
to_y: "elm.padding.top";
}
rel2 {
relative: 0.0 0.0;
to_x: "elm.padding.right";
to_y: "elm.padding.bottom";
}
fixed: 1 0;
min: 0 LIST_TEXT_MAIN_HEIGHT_INC;
align: 0.5 0.5;
text {
min: 0 1;
max: 1 1;
style: "list_text_3text.1icon_main_normal";
fit: 1 0;
size: LIST_TEXT_MAIN_SIZE_INC;
size_range: LIST_TEXT_MAIN_MIN_SIZE_INC LIST_TEXT_MAIN_SIZE_INC;
ellipsize {
fade.mode: ON;
marquee {
type: ROLL;
loop: 1;
loop_delay: MARQUEE_LOOP_DELAY;
**speed: MARQUEE_SPEED;**
}
}
}
}
In edc file in 1text group. there is a textblock part for show text.
in the part there is a property for Marquee speed value.
that is for the text scroll speed.
EAPI Eina_Bool
edje_object_part_text_marquee_speed_set(Evas_Object *obj, const char *part, double speed)
And this API can change the property.
【讨论】:
ellipsize 选项?
list_text_3text.1icon_main_normal、LIST_TEXT_MAIN_SIZE_INC 和LIST_TEXT_MAIN_MIN_SIZE_INC。或者我真的必须克隆整个 Tizen 分支来改变字幕速度? :D
更多关于 genlist 中选取框的信息。 edje_object_part_text_marquee_speed_set API 可用于 edje 对象以更改选取框速度。 然而,genlist item 不会暴露他们的 edje 对象, 因此您无法通过 API 更改选取框速度。 您唯一能做的就是自定义新的 genlist 项目 edc 称为“1text”样式, 并更改选取框速度属性。
【讨论】: