fix window_base_load_theme_obj

This commit is contained in:
xianjimli 2019-04-03 14:19:56 +08:00
parent 112c98816c
commit 5a40109a00
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* 修改edit软键盘无法关闭的BUG。
* 修改窗口动画因为取整导致的问题。
* text selector的options属性指定范围时支持指定格式。
* 修改window\_base\_load\_theme\_obj从自己的assets\_manager中加载资源。
* 2019/04/02
* 软键盘支持tab键。

View File

@ -48,6 +48,7 @@ ret_t window_base_on_paint_end(widget_t* widget, canvas_t* c) {
static ret_t window_base_load_theme_obj(widget_t* widget) {
window_base_t* window_base = WINDOW_BASE(widget);
assets_manager_t* am = widget_get_assets_manager(widget);
const char* theme_name = widget->name;
@ -56,7 +57,7 @@ static ret_t window_base_load_theme_obj(widget_t* widget) {
}
if (theme_name != NULL) {
window_base->res_theme = assets_manager_ref(assets_manager(), ASSET_TYPE_STYLE, theme_name);
window_base->res_theme = assets_manager_ref(am, ASSET_TYPE_STYLE, theme_name);
}
if (window_base->res_theme != NULL) {
@ -155,7 +156,8 @@ ret_t window_base_on_destroy(widget_t* widget) {
}
if (window_base->res_theme != NULL) {
assets_manager_unref(assets_manager(), window_base->res_theme);
assets_manager_t* am = widget_get_assets_manager(widget);
assets_manager_unref(am, window_base->res_theme);
}
return RET_OK;