chore: many trivial spelling and layout fixes (#3008)

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
ckielstra
2022-01-17 14:10:23 +01:00
committed by GitHub
parent a9a6cb8efd
commit febafd1cc7
128 changed files with 316 additions and 335 deletions

View File

@@ -41,8 +41,8 @@ See in [lv_demo_benchmark](https://github.com/lvgl/lv_examples/tree/master/src/l
### Stress
A stress test for LVGL. It contains a lot of object creation, deletion, animations, style usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
See in [lv_demo_stress](https://github.com/lvgl/lv_examples/tree/master/src/lv_demo_stress) folder.
<img src="https://github.com/lvgl/lv_examples/blob/master/src/lv_demo_stress/screenshot1.png?raw=true" width=600px alt="Stress tes tfor LVGL">
<img src="https://github.com/lvgl/lv_examples/blob/master/src/lv_demo_stress/screenshot1.png?raw=true" width=600px alt="Stress test for LVGL">
## Contributing
For contribution and coding style guidelines, please refer to the file docs/CONTRIBUTNG.md in the main LVGL repo:
For contribution and coding style guidelines, please refer to the file docs/CONTRIBUTING.md in the main LVGL repo:
  https://github.com/lvgl/lvgl

View File

@@ -3,10 +3,10 @@
## Overview
The benchmark demo tests the performance in various cases.
For example rectangle, border, shadow, text, image blending, image transformation, bleding modes, etc.
For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc.
All tests are repeated with 50% opacity.
The size an position of the objects during testing are set with a pseudo random number to make the benchmark repeatable.
The size and position of the objects during testing are set with a pseudo random number to make the benchmark repeatable.
On to top of the screen the title of the current test step, and the result of the previous step is displayed.

View File

@@ -734,7 +734,7 @@ static void scene_next_task_cb(lv_timer_t * timer)
uint32_t fps_normal_unweighted = fps_normal_sum / weight_normal_sum;
uint32_t fps_opa_unweighted = fps_opa_sum / weight_opa_sum;
uint32_t opa_speed_pct = (fps_opa_unweighted * 100) / fps_normal_unweighted;
uint32_t opa_speed_pct = (fps_opa_unweighted * 100) / fps_normal_unweighted;
lv_obj_clean(lv_scr_act());
scene_bg = NULL;

View File

@@ -17,8 +17,8 @@ The music player demo shows what kind of modern, smartphone-like user interfaces
- Zoom the album cover proportionality to the current bass value
- Display the 4 bands on the left side of a circle by default at 0°, 45°, 90°, 135°
- Add extra bars next to the "main bars" with a cosine shape. Add more bars for the lower bands.
- If the there is a large enough bass add a random offset to the position of the bars. E.g. start from 63° istead of 0°. (bars greater than 180° start again from 0°)
- If there no bass add 1 to the offset of the bars (it creates a "walking" effect)
- If there is a large enough bass, add a random offset to the position of the bars. E.g. start from 63° instead of 0°. (bars greater than 180° start again from 0°)
- If there is no bass, add 1 to the offset of the bars (it creates a "walking" effect)
- Mirror the bars to the right side of the circle
## Using spectrum.py

View File

@@ -226,7 +226,7 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent)
start_anim = true;
lv_timer_t * timer = lv_timer_create(stop_start_anim, INTRO_TIME + 6000, NULL);
lv_timer_t * timer = lv_timer_create(stop_start_anim, INTRO_TIME + 6000, NULL);
lv_timer_set_repeat_count(timer, 1);
lv_anim_init(&a);
@@ -799,7 +799,7 @@ static void spectrum_draw_event_cb(lv_event_t * e)
for(i = 0; i < BAR_CNT; i++) {
uint32_t deg_space = 1;
uint32_t deg = i * DEG_STEP + 90;
uint32_t j = (i + bar_rot + rnd_array[bar_ofs %10]) % BAR_CNT;
uint32_t j = (i + bar_rot + rnd_array[bar_ofs %10]) % BAR_CNT;
uint32_t k = (i + bar_rot + rnd_array[(bar_ofs + 1) % 10]) % BAR_CNT;
uint32_t v = (r[k] * animv + r[j] * (amax - animv)) / amax;

View File

@@ -281,7 +281,7 @@ static void obj_test_task_cb(lv_timer_t * tmr)
break;
case 18:
obj = lv_list_create(main_page);
obj = lv_list_create(main_page);
{
lv_obj_t * b;
b = lv_list_add_btn(obj, LV_SYMBOL_OK, "1. Some very long text to scroll");

View File

@@ -101,36 +101,36 @@ void lv_demo_widgets(void)
if(disp_size == DISP_LARGE) {
tab_h = 70;
#if LV_FONT_MONTSERRAT_24
font_large = &lv_font_montserrat_24;
font_large = &lv_font_montserrat_24;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_24 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
#if LV_FONT_MONTSERRAT_16
font_normal = &lv_font_montserrat_16;
font_normal = &lv_font_montserrat_16;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_16 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
} else if(disp_size == DISP_MEDIUM) {
tab_h = 45;
#if LV_FONT_MONTSERRAT_20
font_large = &lv_font_montserrat_20;
font_large = &lv_font_montserrat_20;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_20 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
#if LV_FONT_MONTSERRAT_14
font_normal = &lv_font_montserrat_14;
font_normal = &lv_font_montserrat_14;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_14 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
} else { /* disp_size == DISP_SMALL */
tab_h = 45;
#if LV_FONT_MONTSERRAT_18
font_large = &lv_font_montserrat_18;
font_large = &lv_font_montserrat_18;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_18 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
#if LV_FONT_MONTSERRAT_12
font_normal = &lv_font_montserrat_12;
font_normal = &lv_font_montserrat_12;
#else
LV_LOG_WARN("LV_FONT_MONTSERRAT_12 is not enabled for the widgets demo. Using LV_FONT_DEFAULT instead.");
#endif
@@ -1058,7 +1058,7 @@ static void color_event_cb(lv_event_t * e)
}
else if(code == LV_EVENT_CLICKED) {
lv_palette_t * palette_primary = lv_event_get_user_data(e);
lv_palette_t palette_secondary = (*palette_primary) + 3; /*Use an other palette as secondary*/
lv_palette_t palette_secondary = (*palette_primary) + 3; /*Use another palette as secondary*/
if(palette_secondary >= _LV_PALETTE_LAST) palette_secondary = 0;
lv_theme_default_init(NULL, lv_palette_main(*palette_primary), lv_palette_main(palette_secondary), LV_THEME_DEFAULT_DARK, font_normal);

View File

@@ -91,7 +91,7 @@ def gauge_anim(a,gauge,val):
def bar_anim(task,bar):
val = bar.get_value()
# print("bar value: ",val)
max_value = bar.get_max_value()
max_value = bar.get_max_value()
val += 1
if val > max_value:
val=0
@@ -148,7 +148,7 @@ def controls_create(parent):
h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Basics")
disp_size = display.get_size_category()
if disp_size <= lv.DISP_SIZE.SMALL:
if disp_size <= lv.DISP_SIZE.SMALL:
grid_w= lv.page.get_width_grid(lv.page.__cast__(parent),1,1)
# print("grid_w: ",grid_w)
else:
@@ -338,7 +338,7 @@ def visuals_create(parent):
if grid_w_meter < meter_h:
meter_size = grid_w_meter
else:
meter_size = meter_h
meter_size = meter_h
lmeter = lv.linemeter(parent, None)
lmeter.set_drag_parent(True)