register icon as alias of image

This commit is contained in:
lixianjing 2022-05-28 17:39:22 +08:00
parent a59fba8544
commit 6529fc0000
3 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,8 @@
# 最新动态
2022/05/28
* 注册icon控件为image控件的别名。
2022/05/27
* 增加函数 svg\_file\_to\_bsvg。
* typed\_array支持bool类型(感谢兆坤提供补丁)。

View File

@ -1086,6 +1086,12 @@ BEGIN_C_DECLS
*/
#define WIDGET_TYPE_IMAGE "image"
/**
* @const WIDGET_TYPE_ICON
*
*/
#define WIDGET_TYPE_ICON "icon"
/**
* @const WIDGET_TYPE_EDIT
*

View File

@ -69,6 +69,7 @@ ret_t tk_widgets_init(void) {
#ifndef AWTK_NOGUI
FACTORY_TABLE_ENTRY(WIDGET_TYPE_DIALOG_TITLE, dialog_title_create)
FACTORY_TABLE_ENTRY(WIDGET_TYPE_DIALOG_CLIENT, dialog_client_create)
FACTORY_TABLE_ENTRY(WIDGET_TYPE_ICON, image_create)
FACTORY_TABLE_ENTRY(WIDGET_TYPE_IMAGE, image_create)
FACTORY_TABLE_ENTRY(WIDGET_TYPE_BUTTON, button_create)
FACTORY_TABLE_ENTRY(WIDGET_TYPE_LABEL, label_create)