mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve comments
This commit is contained in:
parent
c74f8de0b5
commit
16da3874e6
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2023/08/22
|
||||
* slide\_meun增加一个注释来说明代码用途(感谢智明提供补丁)
|
||||
|
||||
2023/08/21
|
||||
* 增加函数cmd\_args\_process\_wstr
|
||||
* 增加函数tk\_utf8\_dup\_wstr
|
||||
|
@ -399,6 +399,7 @@ static ret_t slide_menu_do_layout_children(widget_t* widget) {
|
||||
scale = slide_menu_calc_child_scale(slide_menu, curr, curr, xoffset);
|
||||
w = tk_roundi(menu_w * scale);
|
||||
h = tk_roundi(menu_h * scale);
|
||||
/* 由于菜单控件滑块一半的 menu_w_s 的时候 children[curr] 就会交换为下一个或者上一个控件,所以写的一套公式来配合这个逻辑来移动 */
|
||||
x = (widget->w - menu_w) * 0.5f + xoffset - (xoffset * max_crevice_scale * menu_w / menu_w_s);
|
||||
y = slide_menu_calc_child_y(slide_menu->align_v, menu_h, h);
|
||||
widget_move_resize(iter, x, y, w, h);
|
||||
|
Loading…
Reference in New Issue
Block a user