Skip to content

Commit

Permalink
add bar_size prop for slider
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Mar 21, 2019
1 parent 251b4bd commit 3e0c7ba
Show file tree
Hide file tree
Showing 15 changed files with 202 additions and 56 deletions.
16 changes: 8 additions & 8 deletions demos/assets.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,24 +365,24 @@
#include "assets/inc/images/arrow_left_n.data"
#include "assets/inc/images/edit_clear_p.data"
#include "assets/inc/images/battery_2.data"
#endif/*WITH_STB_IMAGE*/
#endif /*WITH_STB_IMAGE*/
#ifdef WITH_VGCANVAS
#include "assets/inc/images/pointer_4.bsvg"
#include "assets/inc/images/china.bsvg"
#include "assets/inc/images/pointer_1.bsvg"
#include "assets/inc/images/pointer.bsvg"
#include "assets/inc/images/girl.bsvg"
#endif/*WITH_VGCANVAS*/
#endif /*WITH_VGCANVAS*/
#if defined(WITH_STB_FONT) || defined(WITH_FT_FONT)
#ifdef WITH_MINI_FONT
#include "assets/inc/fonts/default.mini.res"
#else/*WITH_MINI_FONT*/
#else /*WITH_MINI_FONT*/
#include "assets/inc/fonts/default.res"
#endif/*WITH_MINI_FONT*/
#else/*WITH_STB_FONT or WITH_FT_FONT*/
#endif /*WITH_MINI_FONT*/
#else /*WITH_STB_FONT or WITH_FT_FONT*/
#include "assets/inc/fonts/default.data"
#endif/*WITH_STB_FONT or WITH_FT_FONT*/
#endif/*WITH_FS_RES*/
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
#endif /*WITH_FS_RES*/

ret_t assets_init(void) {
assets_manager_t* rm = assets_manager();
Expand Down Expand Up @@ -639,7 +639,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, image_pointer_1);
assets_manager_add(rm, image_pointer);
assets_manager_add(rm, image_girl);
#endif/*WITH_VGCANVAS*/
#endif /*WITH_VGCANVAS*/
#endif

tk_init_assets();
Expand Down
44 changes: 22 additions & 22 deletions demos/assets/inc/ui/vtranslate.data
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
const unsigned char ui_vtranslate[] = {
0x04,0x00,0x01,0x01,0x2b,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,
0x04,0x00,0x01,0x01,0x38,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,
0x74,0x65,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
0x5f,0x68,0x69,0x6e,0x74,0x00,0x76,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x00,0x73,0x6c,
0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x50,0x00,
0x00,0x00,0x14,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
0x00,0x00,0x28,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x31,0x30,0x2c,
0x77,0x3d,0x38,0x30,0x25,0x2c,0x68,0x3d,0x32,0x30,0x29,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x31,0x30,
0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,
0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,
0x79,0x3d,0x35,0x30,0x2c,0x77,0x3d,0x38,0x30,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x73,0x74,0x79,
0x6c,0x65,0x00,0x69,0x6d,0x67,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x32,0x30,0x00,0x00,0x00,0x73,0x6c,
0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5a,0x00,0x00,0x00,0x50,0x00,
0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x39,0x30,0x2c,
0x77,0x3d,0x38,0x30,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x69,0x6d,
0x67,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x33,0x30,0x00,0x6d,0x69,0x6e,0x00,0x35,0x00,0x6d,0x61,0x78,
0x00,0x35,0x30,0x00,0x73,0x74,0x65,0x70,0x00,0x35,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
0x77,0x3d,0x38,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x31,0x30,
0x00,0x62,0x61,0x72,0x5f,0x73,0x69,0x7a,0x65,0x00,0x31,0x30,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,
0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x3c,
0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x35,0x30,0x2c,0x77,0x3d,0x38,
0x30,0x25,0x2c,0x68,0x3d,0x36,0x30,0x29,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x69,0x6d,0x67,0x00,0x76,
0x61,0x6c,0x75,0x65,0x00,0x32,0x30,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x72,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x73,0x65,
0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,
0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x31,0x32,0x30,0x2c,0x77,0x3d,0x38,0x30,0x25,0x2c,0x68,
0x3d,0x36,0x30,0x29,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x69,0x6d,0x67,0x00,0x76,0x61,0x6c,0x75,0x65,
0x00,0x33,0x30,0x00,0x6d,0x69,0x6e,0x00,0x35,0x00,0x6d,0x61,0x78,0x00,0x35,0x30,0x00,0x73,0x74,0x65,
0x70,0x00,0x35,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x1e,0x00,0x00,
0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,
0x30,0x2c,0x77,0x3d,0x32,0x35,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,
0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,};/*603*/
0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,
0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,
0x65,0x72,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x32,0x35,0x25,
0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,
0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*616*/
Binary file modified demos/assets/raw/ui/vtranslate.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions demos/assets/raw/ui/vtranslate.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<window anim_hint="vtranslate">
<slider x="center" y="10" w="80%" h="20" value="10"/>
<slider style="img" x="center" y="50" w="80%" h="30" value="20" />
<slider style="img" x="center" y="90" w="80%" h="30" value="30" min="5" max="50" step="5"/>
<slider x="center" y="10" w="80%" h="40" value="10" bar_size="10"/>
<slider style="img" x="center" y="50" w="80%" h="60" value="20" />
<slider style="img" x="center" y="120" w="80%" h="60" value="30" min="5" max="50" step="5"/>
<button name="close" x="center" y="bottom:10" w="25%" h="30" text="Close"/>
</window>
1 change: 1 addition & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* 2019/03/21
* 增加lcd\_profile用于对绘制函数进行profile。
* data资源支持同文件名,不同扩展名。
* slider增加bar\_size属性。

* 2019/03/20
* 支持编译Windows 32 位版本(感谢陈谭提供补丁)
Expand Down
Binary file added docs/manual/images/lcd_profile_t_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/manual/lcd_profile_t.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## lcd\_profile\_t
### 概述
![image](images/lcd_profile_t_0.png)

对现有LCD对象进行包装,实现对各个函数的时间统计,用于辅助定位性能瓶颈。


----------------------------------
30 changes: 15 additions & 15 deletions docs/manual/lcd_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
| <a href="#lcd_t_lcd_fill_rect">lcd\_fill\_rect</a> | 绘制实心矩形。 |
| <a href="#lcd_t_lcd_get_clip_rect">lcd\_get\_clip\_rect</a> | 获取裁剪区域。 |
| <a href="#lcd_t_lcd_get_desired_bitmap_format">lcd\_get\_desired\_bitmap\_format</a> | 获取期望的位图格式。绘制期望的位图格式可以提高绘制性能。 |
| <a href="#lcd_t_lcd_get_point_color_t">lcd\_get\_point\_color\_t</a> | 获取指定点的颜色,对于基于非FrameBuffer的LCD,返回当前的fill_color。 |
| <a href="#lcd_t_lcd_get_point_color">lcd\_get\_point\_color</a> | 获取指定点的颜色,对于基于非FrameBuffer的LCD,返回当前的fill_color。 |
| <a href="#lcd_t_lcd_get_vgcanvas">lcd\_get\_vgcanvas</a> | 获取矢量图canvas。 |
| <a href="#lcd_t_lcd_is_swappable">lcd\_is\_swappable</a> | 判读lcd是否支持swap。 |
| <a href="#lcd_t_lcd_measure_text">lcd\_measure\_text</a> | 测量字符串占用的宽度。 |
Expand Down Expand Up @@ -63,7 +63,7 @@
* 函数原型:

```
ret_t lcd_begin_frame (lcd_t* lcd, rect_t* dirty_rect, bool_t anim_mode);
ret_t lcd_begin_frame (lcd_t* lcd, rect_t* dirty_rect, lcd_draw_mode_t anim_mode);
```

* 参数说明:
Expand All @@ -73,7 +73,7 @@ ret_t lcd_begin_frame (lcd_t* lcd, rect_t* dirty_rect, bool_t anim_mode);
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| lcd | lcd\_t* | lcd对象。 |
| dirty\_rect | rect\_t* | 需要绘制的区域。 |
| anim\_mode | bool\_t | 动画模式,如果可能,直接画到显存而不是离线的framebuffer。 |
| anim\_mode | lcd\_draw\_mode\_t | 动画模式,如果可能,直接画到显存而不是离线的framebuffer。 |
#### lcd\_draw\_glyph 函数
-----------------------

Expand Down Expand Up @@ -111,7 +111,7 @@ ret_t lcd_draw_glyph (lcd_t* lcd, glyph_t* glyph, rect_t* src, xy_t x, xy_t y);
* 函数原型:

```
ret_t lcd_draw_hline (lcd_t* lcd, xy_t* x, xy_t* y, xy_t* w);
ret_t lcd_draw_hline (lcd_t* lcd, xy_t x, xy_t y, xy_t w);
```

* 参数说明:
Expand All @@ -120,9 +120,9 @@ ret_t lcd_draw_hline (lcd_t* lcd, xy_t* x, xy_t* y, xy_t* w);
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| lcd | lcd\_t* | lcd对象。 |
| x | xy\_t* | x坐标。 |
| y | xy\_t* | y坐标。 |
| w | xy\_t* | 直线宽度。 |
| x | xy\_t | x坐标。 |
| y | xy\_t | y坐标。 |
| w | xy\_t | 直线宽度。 |
#### lcd\_draw\_image 函数
-----------------------

Expand Down Expand Up @@ -229,7 +229,7 @@ ret_t lcd_draw_text (lcd_t* lcd, const wchar_t* str, uint32_t nr, xy_t x, xy_t y
* 函数原型:

```
ret_t lcd_draw_vline (lcd_t* lcd, xy_t* x, xy_t* y, xy_t* h);
ret_t lcd_draw_vline (lcd_t* lcd, xy_t x, xy_t y, xy_t h);
```

* 参数说明:
Expand All @@ -238,9 +238,9 @@ ret_t lcd_draw_vline (lcd_t* lcd, xy_t* x, xy_t* y, xy_t* h);
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| lcd | lcd\_t* | lcd对象。 |
| x | xy\_t* | x坐标。 |
| y | xy\_t* | y坐标。 |
| h | xy\_t* | 直线高度。 |
| x | xy\_t | x坐标。 |
| y | xy\_t | y坐标。 |
| h | xy\_t | 直线高度。 |
#### lcd\_end\_frame 函数
-----------------------

Expand Down Expand Up @@ -330,26 +330,26 @@ bitmap_format_t lcd_get_desired_bitmap_format (lcd_t* lcd);
| -------- | ----- | --------- |
| 返回值 | bitmap\_format\_t | 返回期望的位图格式。 |
| lcd | lcd\_t* | lcd对象。 |
#### lcd\_get\_point\_color\_t 函数
#### lcd\_get\_point\_color 函数
-----------------------

* 函数功能:

> <p id="lcd_t_lcd_get_point_color_t"> 获取指定点的颜色,对于基于非FrameBuffer的LCD,返回当前的fill_color。
> <p id="lcd_t_lcd_get_point_color"> 获取指定点的颜色,对于基于非FrameBuffer的LCD,返回当前的fill_color。


* 函数原型:

```
ret_t lcd_get_point_color_t (lcd_t* lcd, xy_t x, xy_t y);
color_t lcd_get_point_color (lcd_t* lcd, xy_t x, xy_t y);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| 返回值 | color\_t | 返回RET\_OK表示成功,否则表示失败。 |
| lcd | lcd\_t* | lcd对象。 |
| x | xy\_t | x坐标。 |
| y | xy\_t | y坐标。 |
Expand Down
41 changes: 41 additions & 0 deletions docs/manual/slider_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
| -------- | ------------ |
| <a href="#slider_t_slider_cast">slider\_cast</a> | 转换为slider对象(供脚本语言使用)。 |
| <a href="#slider_t_slider_create">slider\_create</a> | 创建slider对象 |
| <a href="#slider_t_slider_set_bar_size">slider\_set\_bar\_size</a> | 设置bar的宽度或高度。 |
| <a href="#slider_t_slider_set_max">slider\_set\_max</a> | 设置滑块的最大值。 |
| <a href="#slider_t_slider_set_min">slider\_set\_min</a> | 设置滑块的最小值。 |
| <a href="#slider_t_slider_set_step">slider\_set\_step</a> | 设置滑块的拖动的最小单位。 |
Expand All @@ -61,6 +62,7 @@

| 属性名称 | 类型 | 说明 |
| -------- | ----- | ------------ |
| <a href="#slider_t_bar_size">bar\_size</a> | uint32\_t | bar的宽度或高度。 |
| <a href="#slider_t_max">max</a> | uint16\_t | 最大值。 |
| <a href="#slider_t_min">min</a> | uint16\_t | 最小值。 |
| <a href="#slider_t_step">step</a> | uint16\_t | 拖动的最小单位。 |
Expand Down Expand Up @@ -120,6 +122,28 @@ widget_t* slider_create (widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h);
| y | xy\_t | y坐标 |
| w | wh\_t | 宽度 |
| h | wh\_t | 高度 |
#### slider\_set\_bar\_size 函数
-----------------------

* 函数功能:

> <p id="slider_t_slider_set_bar_size"> 设置bar的宽度或高度。


* 函数原型:

```
ret_t slider_set_bar_size (widget_t* widget, uint32_t bar_size);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| widget | widget\_t* | 控件对象。 |
| bar\_size | uint32\_t | bar的宽度或高度。 |
#### slider\_set\_max 函数
-----------------------

Expand Down Expand Up @@ -230,6 +254,23 @@ ret_t slider_set_vertical (widget_t* widget, bool_t vertical);
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| widget | widget\_t* | 控件对象。 |
| vertical | bool\_t | 是否为垂直方向。 |
#### bar\_size 属性
-----------------------
> <p id="slider_t_bar_size"> bar的宽度或高度。

* 类型:uint32\_t

| 特性 | 是否支持 |
| -------- | ----- |
| 可直接读取 ||
| 可直接修改 ||
| 可持久化 ||
| 可脚本化 ||
| 可在IDE中设置 ||
| 可在XML中设置 ||
| 可通过widget\_get\_prop读取 ||
| 可通过widget\_set\_prop修改 ||
#### max 属性
-----------------------
> <p id="slider_t_max"> 最大值。
Expand Down
2 changes: 2 additions & 0 deletions docs/manual/widget_prop_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| WIDGET\_PROP\_Y | Y坐标。 |
| WIDGET\_PROP\_W | 宽度。 |
| WIDGET\_PROP\_H | 高度。 |
| WIDGET\_PROP\_BAR\_SIZE | slider中的bar的的宽度或高度。 |
| WIDGET\_PROP\_OPACITY | 不透明度。 |
| WIDGET\_PROP\_MIN\_W | 最小宽度。 |
| WIDGET\_PROP\_MAX\_W | 最大宽度。 |
Expand Down Expand Up @@ -109,3 +110,4 @@
| WIDGET\_PROP\_DELAY | 延迟时间(毫秒) |
| WIDGET\_PROP\_IS\_KEYBOARD | 是否为键盘。 |
| WIDGET\_PROP\_FOCUS | 设置为输入焦点。 |
| WIDGET\_PROP\_FOCUSABLE | 是否支持焦点停留。 |
6 changes: 6 additions & 0 deletions src/base/widget_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ BEGIN_C_DECLS
*/
#define WIDGET_PROP_H "h"

/**
* @const WIDGET_PROP_BAR_SIZE
* slider中的bar的的宽度或高度。
*/
#define WIDGET_PROP_BAR_SIZE "bar_size"

/**
* @const WIDGET_PROP_OPACITY
* 不透明度。
Expand Down
Loading

0 comments on commit 3e0c7ba

Please sign in to comment.