mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
format code
This commit is contained in:
parent
c057fd87f3
commit
0084c96fec
@ -14,7 +14,7 @@ ret_t assets_init(const char* theme) {
|
||||
return assets_init_default();
|
||||
} else if (tk_str_eq(theme, "dark")) {
|
||||
return assets_init_dark();
|
||||
} else {
|
||||
} else {
|
||||
log_debug("%s not support.\n", theme);
|
||||
return RET_NOT_IMPL;
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char image_3[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_arrow_left_n[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_edit_clear_p[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_battery_2[]);
|
||||
#endif/*WITH_STB_IMAGE*/
|
||||
#endif /*WITH_STB_IMAGE*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_pointer_4[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_htest[]);
|
||||
@ -437,21 +437,21 @@ extern TK_CONST_DATA_ALIGN(const unsigned char image_china[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_pointer_1[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_pointer[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char image_girl[]);
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#if defined(WITH_STB_FONT) || defined(WITH_FT_FONT)
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_ap[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_full[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default[]);
|
||||
#else/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#else /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_20[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_16[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_18[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_96[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_32[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char font_default_24[]);
|
||||
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char script_dummy[]);
|
||||
#endif/*WITH_FS_RES*/
|
||||
#endif /*WITH_FS_RES*/
|
||||
|
||||
ret_t assets_init_dark(void) {
|
||||
assets_manager_t* am = assets_manager();
|
||||
@ -756,14 +756,14 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, font_ap);
|
||||
assets_manager_add(am, font_default_full);
|
||||
assets_manager_add(am, font_default);
|
||||
#else/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#else /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
assets_manager_add(am, font_default_20);
|
||||
assets_manager_add(am, font_default_16);
|
||||
assets_manager_add(am, font_default_18);
|
||||
assets_manager_add(am, font_default_96);
|
||||
assets_manager_add(am, font_default_32);
|
||||
assets_manager_add(am, font_default_24);
|
||||
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
assets_manager_add(am, image_pointer_4);
|
||||
assets_manager_add(am, image_htest);
|
||||
@ -772,7 +772,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, image_pointer_1);
|
||||
assets_manager_add(am, image_pointer);
|
||||
assets_manager_add(am, image_girl);
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
assets_manager_add(am, script_dummy);
|
||||
#endif
|
||||
|
||||
|
@ -428,7 +428,7 @@
|
||||
#include "assets/default/inc/images/arrow_left_n.data"
|
||||
#include "assets/default/inc/images/edit_clear_p.data"
|
||||
#include "assets/default/inc/images/battery_2.data"
|
||||
#endif/*WITH_STB_IMAGE*/
|
||||
#endif /*WITH_STB_IMAGE*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
#include "assets/default/inc/images/pointer_4.bsvg"
|
||||
#include "assets/default/inc/images/htest.bsvg"
|
||||
@ -437,21 +437,21 @@
|
||||
#include "assets/default/inc/images/pointer_1.bsvg"
|
||||
#include "assets/default/inc/images/pointer.bsvg"
|
||||
#include "assets/default/inc/images/girl.bsvg"
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
#if defined(WITH_STB_FONT) || defined(WITH_FT_FONT)
|
||||
#include "assets/default/inc/fonts/ap.res"
|
||||
#include "assets/default/inc/fonts/default_full.res"
|
||||
#include "assets/default/inc/fonts/default.res"
|
||||
#else/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#else /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#include "assets/default/inc/fonts/default_20.data"
|
||||
#include "assets/default/inc/fonts/default_16.data"
|
||||
#include "assets/default/inc/fonts/default_18.data"
|
||||
#include "assets/default/inc/fonts/default_96.data"
|
||||
#include "assets/default/inc/fonts/default_32.data"
|
||||
#include "assets/default/inc/fonts/default_24.data"
|
||||
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#include "assets/default/inc/scripts/dummy.res"
|
||||
#endif/*WITH_FS_RES*/
|
||||
#endif /*WITH_FS_RES*/
|
||||
|
||||
ret_t assets_init_default(void) {
|
||||
assets_manager_t* am = assets_manager();
|
||||
@ -756,14 +756,14 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, font_ap);
|
||||
assets_manager_add(am, font_default_full);
|
||||
assets_manager_add(am, font_default);
|
||||
#else/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#else /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
assets_manager_add(am, font_default_20);
|
||||
assets_manager_add(am, font_default_16);
|
||||
assets_manager_add(am, font_default_18);
|
||||
assets_manager_add(am, font_default_96);
|
||||
assets_manager_add(am, font_default_32);
|
||||
assets_manager_add(am, font_default_24);
|
||||
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
|
||||
#ifdef WITH_VGCANVAS
|
||||
assets_manager_add(am, image_pointer_4);
|
||||
assets_manager_add(am, image_htest);
|
||||
@ -772,7 +772,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, image_pointer_1);
|
||||
assets_manager_add(am, image_pointer);
|
||||
assets_manager_add(am, image_girl);
|
||||
#endif/*WITH_VGCANVAS*/
|
||||
#endif /*WITH_VGCANVAS*/
|
||||
assets_manager_add(am, script_dummy);
|
||||
#endif
|
||||
|
||||
|
@ -127,18 +127,17 @@ static inline frr_image_info_t* widget_image_info_create(frr_image_info_t* info,
|
||||
info = TKMEM_ZALLOC(frr_image_info_t);
|
||||
return_value_if_fail(info != NULL, NULL);
|
||||
}
|
||||
if(vg != NULL) {
|
||||
if (vg != NULL) {
|
||||
info->w = vg->w;
|
||||
info->h = vg->h;
|
||||
info->stride = vg->stride;
|
||||
info->format = vg->format;
|
||||
info->dst = (unsigned char*)vg->buff;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mem = (lcd_mem_t*)c->lcd;
|
||||
info->w = mem->base.w;
|
||||
info->h = mem->base.h;
|
||||
info->format = mem->format;
|
||||
info->format = mem->format;
|
||||
info->dst = mem->offline_fb;
|
||||
info->stride = mem->line_length;
|
||||
}
|
||||
|
@ -355,8 +355,8 @@ static ret_t scroll_view_on_event(widget_t* widget, event_t* e) {
|
||||
scroll_view->dragged = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
ret = RET_STOP;
|
||||
|
||||
ret = RET_STOP;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user