diff --git a/README.md b/README.md index e8a452ee16..b429b60504 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Basically, every modern controller (which is able to drive a display) is suitabl *Note that the memory usage might vary depending on the architecture, compiler and build options.* ### Supported platforms -LVGL is completely platform independent and can be used with any MCU that fulfills the requirements. +LVGL is completely platform independent and can be used with any MCU that fulfills the requirements. Just to mention some platforms: - NXP: Kinetis, LPC, iMX, iMX RT - STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7 diff --git a/README_zh.md b/README_zh.md index f8ede37997..96d87792b6 100644 --- a/README_zh.md +++ b/README_zh.md @@ -95,7 +95,7 @@ LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入 *注意:资源占用情况与具体硬件平台、编译器等因素有关,上表中仅给出参考值* ### 已经支持的平台 -LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。 +LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。 如下仅列举其中一部分: - NXP: Kinetis, LPC, iMX, iMX RT diff --git a/demos/README.md b/demos/README.md index 8e311d1fbe..d894ee306d 100644 --- a/demos/README.md +++ b/demos/README.md @@ -1,7 +1,7 @@ # Demos for LVGL ## Add the examples to your projects -1. demos can be found in the 'demos' folder once you clone the lvgl. +1. demos can be found in the 'demos' folder once you clone the lvgl. 2. In the ***lv_conf.h*** or equivalent places, you can find demo related macros, change its value to enable or disable specified demos: @@ -38,7 +38,7 @@ ... ``` -3. If your development environment or toolchain does not add source files inside '***lvgl***' folder automatically, ensure the `demos` folder is included for compilation. +3. If your development environment or toolchain does not add source files inside '***lvgl***' folder automatically, ensure the `demos` folder is included for compilation. 4. Include "***demos/lv_demos.h***" in your application source file, for example: ```c @@ -53,7 +53,7 @@ ## Demos ### Widgets -Shows how the widgets look like out of the box using the built-in material theme. +Shows how the widgets look like out of the box using the built-in material theme. See in [widgets](https://github.com/lvgl/lvgl/tree/master/demos/widgets) folder. @@ -68,14 +68,14 @@ For running this demo properly, please make sure **LV_MEM_SIZE** is at least **3 ### Music player -The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution. +The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution. See in [music](https://github.com/lvgl/lvgl/tree/master/demos/music) folder. Music player demo with LVGL ### Keypad and encoder -LVGL allows you to control the widgets with a keypad and/or encoder without a touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches, and text inputs without touchpad. +LVGL allows you to control the widgets with a keypad and/or encoder without a touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches, and text inputs without touchpad. Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder). See in [keypad_encoder](https://github.com/lvgl/lvgl/tree/master/demos/keypad_encoder) folder. @@ -83,12 +83,12 @@ See in [keypad_encoder](https://github.com/lvgl/lvgl/tree/master/demos/keypad_en Keypad and encoder navigation in LVGL embedded GUI library ### Benchmark -A demo to measure the performance of LVGL or to compare different settings. +A demo to measure the performance of LVGL or to compare different settings. See in [benchmark](https://github.com/lvgl/lvgl/tree/master/demos/benchmark) folder. Benchmark demo with LVGL embedded GUI library ### 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. +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 [stress](https://github.com/lvgl/lvgl/tree/master/demos/stress) folder. Stress test for LVGL diff --git a/demos/benchmark/README.md b/demos/benchmark/README.md index cb16782716..59ac164899 100644 --- a/demos/benchmark/README.md +++ b/demos/benchmark/README.md @@ -2,31 +2,31 @@ ## Overview -The benchmark demo tests the performance in various cases. -For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc. +The benchmark demo tests the performance in various cases. +For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc. All tests are repeated with 50% opacity. -The size and 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. ## Run the benchmark - In `lv_conf.h` or equivalent places set `LV_USE_DEMO_BENCHMARK 1` - After `lv_init()` and initializing the drivers call `lv_demo_benchmark()` -- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene()` instead of `lv_demo_benchmark()`and pass the scene number. +- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene()` instead of `lv_demo_benchmark()`and pass the scene number. ## Interpret the result The FPS is measured like this: - load the next step -- in the display driver's `monitor_cb` accumulate the time-to-render and the number of cycles +- in the display driver's `monitor_cb` accumulate the time-to-render and the number of cycles - measure for 1 second - calculate `FPS = time_sum / render_cnt` -Note that it can result in very high FPS results for simple cases. -E.g. if some simple rectangles are drawn in 5 ms, the benchmark will tell it's 200 FPS. -So it ignores `LV_DISP_REFR_PERIOD` which tells LVGL how often it should refresh the screen. +Note that it can result in very high FPS results for simple cases. +E.g. if some simple rectangles are drawn in 5 ms, the benchmark will tell it's 200 FPS. +So it ignores `LV_DISP_REFR_PERIOD` which tells LVGL how often it should refresh the screen. In other words, the benchmark shows the FPS from the pure rendering time. By default, only the changed areas are refreshed. It means if only a few pixels are changed in 1 ms the benchmark will show 1000 FPS. To measure the performance with full screen refresh uncomment `lv_obj_invalidate(lv_scr_act())` in `monitor_cb()` in `lv_demo_benchmark.c`. @@ -34,14 +34,14 @@ By default, only the changed areas are refreshed. It means if only a few pixels ![LVGL benchmark running](https://github.com/lvgl/lvgl/tree/master/demos/benchmark/screenshot1.png?raw=true) -## Result summary +## Result summary In the end, a table is created to display measured FPS values. -On top of the summary screen, the "Weighted FPS" value is shown. -In this, the result of the more common cases are taken into account with a higher weight. +On top of the summary screen, the "Weighted FPS" value is shown. +In this, the result of the more common cases are taken into account with a higher weight. -"Opa. speed" shows the speed of the measurements with opacity compared to full opacity. -E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower. +"Opa. speed" shows the speed of the measurements with opacity compared to full opacity. +E.g. "Opa. speed = 90%" means that rendering with opacity is 10% slower. In the first section of the table, "Slow but common cases", those cases are displayed which are considered common but were slower than 20 FPS. diff --git a/demos/keypad_encoder/README.md b/demos/keypad_encoder/README.md index 4ed14741aa..9fa792a77b 100644 --- a/demos/keypad_encoder/README.md +++ b/demos/keypad_encoder/README.md @@ -2,8 +2,8 @@ ## Overview -LVGL allows you to control the widgets with keypad and/or encoder without touchpad. -This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. +LVGL allows you to control the widgets with keypad and/or encoder without touchpad. +This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder). ![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif) diff --git a/demos/music/README.md b/demos/music/README.md index 4c82576052..1abd7f8c7c 100644 --- a/demos/music/README.md +++ b/demos/music/README.md @@ -1,7 +1,7 @@ # Music player demo ## Overview -The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution. +The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution. ![Music player demo with LVGL embedded GUI library](https://github.com/lvgl/lvgl/tree/master/demos/music/screenshot1.gif?raw=true) @@ -15,7 +15,7 @@ The music player demo shows what kind of modern, smartphone-like user interfaces - `assets/spectrum.py` creates an array of spectrum values from a music. 4 band are created with 33 samples/sec: bass, bass-mid, mid, mid-treble. - The spectrum meter UI does the followings: - 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° + - 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 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) diff --git a/demos/music/assets/spectrum.py b/demos/music/assets/spectrum.py index e6e75f199c..aca370264e 100755 --- a/demos/music/assets/spectrum.py +++ b/demos/music/assets/spectrum.py @@ -18,7 +18,7 @@ fs = int(len(S) / fn) fout.write("const uint16_t spectrum[][4] = {\n") for t in range(0,len(S[0]-1)): fout.write("{ ") - f_prev = 0 + f_prev = 0 for f in [8, 45, 300, 600]: v = 0 for i in range(f_prev, f): v += S[i][t] diff --git a/demos/stress/README.md b/demos/stress/README.md index 7e5d5431cf..72f592067d 100644 --- a/demos/stress/README.md +++ b/demos/stress/README.md @@ -2,8 +2,8 @@ ## Overview -A stress test for LVGL. -It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks. +A stress test for LVGL. +It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks. ![Stress demo with LVGL embedded GUI library](https://github.com/lvgl/lvgl/tree/master/demos/stress/screenshot1.gif?raw=true) diff --git a/demos/widgets/lv_demo_widgets.py b/demos/widgets/lv_demo_widgets.py index 149c780807..ed2e05904f 100755 --- a/demos/widgets/lv_demo_widgets.py +++ b/demos/widgets/lv_demo_widgets.py @@ -17,7 +17,7 @@ LV_DPI =130 LV_ANIM_REPEAT_INFINITE = -1 # Register SDL display driver. - + disp_buf1 = lv.disp_buf_t() buf1_1 = bytes(480 * 10) disp_buf1.init(buf1_1, None, len(buf1_1)//4) @@ -32,7 +32,7 @@ disp_drv.register() # Register SDL mouse driver indev_drv = lv.indev_drv_t() -indev_drv.init() +indev_drv.init() indev_drv.type = lv.INDEV_TYPE.POINTER indev_drv.read_cb = SDL.mouse_read indev_drv.register() @@ -55,7 +55,7 @@ def LV_DPX(n): return tmp else: return 1 - + def color_chg_event_cb(sw, e): if e == lv.EVENT.VALUE_CHANGED: flag = lv.THEME_MATERIAL_FLAG.LIGHT @@ -63,7 +63,7 @@ def color_chg_event_cb(sw, e): flag=lv.THEME_MATERIAL_FLAG.DARK theme = lv.theme_material_init(LV_THEME_DEFAULT_COLOR_PRIMARY,LV_THEME_DEFAULT_COLOR_SECONDARY,flag, lv.theme_get_font_small(), lv.theme_get_font_normal(), lv.theme_get_font_subtitle(), - lv.theme_get_font_title()) + lv.theme_get_font_title()) def slider_event_cb(slider, e): if e == lv.EVENT.VALUE_CHANGED: if slider.get_type() == lv.slider.TYPE.NORMAL: @@ -75,19 +75,19 @@ def slider_event_cb(slider, e): slider_string = str(slider_left) + '-' + str(slider_right) # print("slider left value: %d, slider right value: %d"%(slider_left,slider_right)) slider.set_style_local_value_str(lv.slider.PART.INDIC, lv.STATE.DEFAULT, slider_string) - + def linemeter_anim(a,lmeter, value): lmeter.set_value(value) label = lmeter.get_child(None) label.set_text(str(value)) label.align(lmeter, lv.ALIGN.CENTER, 0, 0) - + def gauge_anim(a,gauge,val): gauge.set_value(0,val) label=gauge.get_child(None) label.set_text(str(val)) label.align(gauge, lv.ALIGN.CENTER, 0, 0) - + def bar_anim(task,bar): val = bar.get_value() # print("bar value: ",val) @@ -95,11 +95,11 @@ def bar_anim(task,bar): val += 1 if val > max_value: val=0 - bar.set_value(val,lv.ANIM.OFF) + bar.set_value(val,lv.ANIM.OFF) cpy_string = "Copying %d/%d"% (val, max_value) # print(cpy_string) bar.set_style_local_value_str(lv.bar.PART.BG, lv.STATE.DEFAULT, cpy_string) - + def arc_phase1_ready_cb(a,arc): a_arc=lv.anim_t() a_arc.init() @@ -117,19 +117,19 @@ def arc_phase2_ready_cb(a,arc): a_arc.set_values(0, 360) a_arc.set_ready_cb(lambda a: arc_phase1_ready_cb(a,arc)) lv.anim_t.start(a_arc) - + def anim_phase1(a,arc,val): arc.set_end_angle(val) label = arc.get_child(None) label.set_text(str(val)) label.align(arc, lv.ALIGN.CENTER, 0, 0) - + def anim_phase2(a,arc,val): arc.set_end_angle(val) label = arc.get_child(None) label.set_text(str(val)) label.align(arc, lv.ALIGN.CENTER, 0, 0) - + def controls_create(parent): lv.page.set_scrl_layout(lv.page.__cast__(parent), lv.LAYOUT.PRETTY_TOP) if LV_DEMO_WIDGETS_SLIDESHOW == 0: @@ -139,15 +139,15 @@ def controls_create(parent): btnm = lv.btnmatrix.__cast__(m.get_btnmatrix()) # print("type(btnm): ",type(btnm)) btnm.set_btn_ctrl(1, lv.btnmatrix.CTRL.CHECK_STATE) - + h = lv.cont(parent, None) h.set_layout(lv.LAYOUT.PRETTY_MID) h.add_style(lv.cont.PART.MAIN, style_box) h.set_drag_parent(True) - + h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Basics") - - disp_size = display.get_size_category() + + disp_size = display.get_size_category() 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) @@ -157,23 +157,23 @@ def controls_create(parent): h.set_fit2(lv.FIT.NONE, lv.FIT.TIGHT) h.set_width(grid_w) - btn = lv.btn(h,None) + btn = lv.btn(h,None) btn.set_fit2(lv.FIT.NONE, lv.FIT.TIGHT) if disp_size <= lv.DISP_SIZE.SMALL: button_width=h.get_width_grid(1,1) else: button_width=h.get_width_grid(2,1) # print("button_width: %d"%button_width) - + btn.set_width(button_width) label = lv.label(btn, None) label.set_text("Button") - + btn = lv.btn(h, btn) btn.toggle() label = lv.label(btn, None) label.set_text("Button") - + lv.switch(h, None) lv.checkbox(h, None) @@ -184,7 +184,7 @@ def controls_create(parent): slider.set_value(40, lv.ANIM.OFF) slider.set_event_cb(slider_event_cb) slider.set_width_margin(fit_w); - + # Use the knobs style value the display the current value in focused state slider.set_style_local_margin_top(lv.slider.PART.BG, lv.STATE.DEFAULT, LV_DPX(25)) slider.set_style_local_value_font(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.theme_get_font_small()) @@ -194,7 +194,7 @@ def controls_create(parent): slider.set_style_local_transition_time(lv.slider.PART.KNOB, lv.STATE.DEFAULT, 300) slider.set_style_local_transition_prop_5(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.STYLE.VALUE_OFS_Y) slider.set_style_local_transition_prop_6(lv.slider.PART.KNOB, lv.STATE.DEFAULT, lv.STYLE.VALUE_OPA) - + slider = lv.slider(h, None) slider.set_type(lv.slider.TYPE.RANGE) slider.set_value(70, lv.ANIM.OFF) @@ -206,11 +206,11 @@ def controls_create(parent): lv.event_send(slider,lv.EVENT.VALUE_CHANGED, None) # To refresh the text if slider.get_width() > fit_w: slider.set_width(fit_w) - + h = lv.cont(parent, h) h.set_fit(lv.FIT.NONE) h.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Text input") - + ta = lv.textarea(h, None) lv.cont.set_fit2(h,lv.FIT.PARENT, lv.FIT.NONE) ta.set_text("") @@ -258,7 +258,7 @@ def visuals_create(parent): chart.set_div_line_count(3, 0) chart.set_point_count(8) chart.set_type(lv.chart.TYPE.LINE) - + if disp_size > lv.DISP_SIZE.SMALL: chart.set_style_local_pad_left(lv.chart.PART.BG, lv.STATE.DEFAULT, 4 * (LV_DPI // 10)) chart.set_style_local_pad_bottom(lv.chart.PART.BG, lv.STATE.DEFAULT, 3 * (LV_DPI // 10)) @@ -268,7 +268,7 @@ def visuals_create(parent): chart.set_x_tick_length(0, 0) chart.set_y_tick_texts("600\n500\n400\n300\n200", 0, lv.chart.AXIS.DRAW_LAST_TICK) chart.set_x_tick_texts("Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug", 0, lv.chart.AXIS.DRAW_LAST_TICK) - + s1 = chart.add_series(LV_THEME_DEFAULT_COLOR_PRIMARY) s2 = chart.add_series(LV_THEME_DEFAULT_COLOR_SECONDARY) @@ -282,7 +282,7 @@ def visuals_create(parent): chart.set_next(s1, 60) chart.set_next(s1, 10) chart.set_next(s1, 90) - + chart.set_next(s2, 32) chart.set_next(s2, 66) chart.set_next(s2, 5) @@ -333,7 +333,7 @@ def visuals_create(parent): grid_w_meter = lv.page.get_width_grid(page, 2, 1) else: grid_w_meter = lv.page.get_width_grid(page, 3, 1) - + meter_h = lv.page.get_height_fit(page) if grid_w_meter < meter_h: meter_size = grid_w_meter @@ -359,7 +359,7 @@ def visuals_create(parent): a_lm.set_playback_time(1000) a_lm.set_repeat_count(LV_ANIM_REPEAT_INFINITE) lv.anim_t.start(a_lm) - + gauge = lv.gauge(parent, None) gauge.set_drag_parent(True) gauge.set_size(meter_size, meter_size) @@ -378,7 +378,7 @@ def visuals_create(parent): a_ga.set_repeat_count(LV_ANIM_REPEAT_INFINITE) a_ga.set_custom_exec_cb(lambda a, val: gauge_anim(a,gauge,val)) lv.anim_t.start(a_ga) - + arc = lv.arc(parent,None) arc.set_drag_parent(True) arc.set_bg_angles(0, 360) @@ -412,7 +412,7 @@ def visuals_create(parent): bar_h.set_width(lv.page.get_width_grid(page, 2, 1)) else: bar_h.set_width(lv.page.get_width_grid(parent, 3, 2)) - + bar = lv.bar(bar_h,None) bar.set_width(lv.cont.get_width_fit(bar_h)) bar.set_style_local_value_font(lv.bar.PART.BG, lv.STATE.DEFAULT, lv.theme_get_font_small()) @@ -421,7 +421,7 @@ def visuals_create(parent): bar.set_style_local_margin_bottom(lv.bar.PART.BG, lv.STATE.DEFAULT, LV_DPI // 7) bar.align(None, lv.ALIGN.CENTER, 0, 0) bar.set_value(30,lv.ANIM.OFF) - + led_h = lv.cont(parent, None) led_h.set_layout(lv.LAYOUT.PRETTY_MID) if disp_size <= lv.DISP_SIZE.SMALL: @@ -459,9 +459,9 @@ def visuals_create(parent): def selectors_create(parent): page = lv.page.__cast__(parent) lv.page.set_scrl_layout(page, lv.LAYOUT.PRETTY_MID) - + grid_h = page.get_height_grid(1, 1) - + if disp_size <= lv.DISP_SIZE.SMALL: grid_w = page.get_width_grid(1, 1) else: @@ -497,7 +497,7 @@ def selectors_create(parent): h.set_style_local_pad_top(lv.cont.PART_MAIN, LV_STATE_DEFAULT, 0); h.set_size(min(grid_h, grid_w), min(grid_h, grid_w)) h.set_layout(lv.LAYOUT.PRETTY_TOP) - + roller = lv.roller(h, None) roller.add_style(lv.cont.PART.MAIN, style_box) roller.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Roller") @@ -508,8 +508,8 @@ def selectors_create(parent): roller.set_width(lv.cont.get_width_grid(h, 1 , 1)) else: roller.set_width(lv.cont.get_width_grid(h, 2 , 1)) - - + + dd = lv.dropdown(h, None) dd.add_style(lv.cont.PART.MAIN, style_box) dd.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Dropdown") @@ -517,20 +517,20 @@ def selectors_create(parent): dd.set_width(lv.cont.get_width_grid(h, 1 , 1)) else: dd.set_width(lv.cont.get_width_grid(h, 2 , 1)) - + dd.set_options("Alpha\nBravo\nCharlie\nDelta\nEcho\nFoxtrot\nGolf\nHotel\nIndia\nJuliette\nKilo\nLima\nMike\nNovember\n" "Oscar\nPapa\nQuebec\nRomeo\nSierra\nTango\nUniform\nVictor\nWhiskey\nXray\nYankee\nZulu") - + list = lv.list(parent, None) list.set_scroll_propagation(True) list.set_size(grid_w, grid_h) - + txts = [lv.SYMBOL.SAVE, "Save", lv.SYMBOL.CUT, "Cut", lv.SYMBOL.COPY, "Copy", lv.SYMBOL.OK, "This is a quite long text to scroll on the list", lv.SYMBOL.EDIT, "Edit", lv.SYMBOL.WIFI, "Wifi", lv.SYMBOL.BLUETOOTH, "Bluetooth", lv.SYMBOL.GPS, "GPS", lv.SYMBOL.USB, "USB", lv.SYMBOL.SD_CARD, "SD card", lv.SYMBOL.CLOSE, "Close"] - - + + for i in range(0,len(txts)//2,2): btn = list.add_btn(txts[i], txts[i + 1]); lv.btn.set_checkable(lv.btn.__cast__(btn),True) @@ -538,9 +538,9 @@ def selectors_create(parent): # Make a button disabled if i == 4: btn.set_state(lv.btn.STATE.DISABLED) - + cal.set_highlighted_dates(hl, 2) - + tv = lv.tabview(lv.scr_act(), None) display = scr.get_disp() disp_size = display.get_size_category() @@ -549,7 +549,7 @@ tv.set_style_local_pad_left(lv.tabview.PART.TAB_BG, lv.STATE.DEFAULT, disp_drv.h sw = lv.switch(lv.scr_act(), None) if lv.theme_get_flags() & lv.THEME_MATERIAL_FLAG.DARK: sw.on(LV_ANIM_OFF) -sw.set_event_cb(color_chg_event_cb) +sw.set_event_cb(color_chg_event_cb) sw.set_pos(LV_DPX(10), LV_DPX(10)) sw.set_style_local_value_str(lv.switch.PART.BG, lv.STATE.DEFAULT, "Dark") sw.set_style_local_value_align(lv.switch.PART.BG, lv.STATE.DEFAULT, lv.ALIGN.OUT_RIGHT_MID) @@ -567,6 +567,6 @@ style_box.set_value_ofs_y(lv.STATE.DEFAULT, - LV_DPX(10)) style_box.set_margin_top(lv.STATE.DEFAULT, LV_DPX(30)) controls_create(t1) -visuals_create(t2) +visuals_create(t2) selectors_create(t3) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cf3fc383df..42edfa138a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,13 +6,13 @@ ### Overview -Among many fixes and minor updates these are the most important features in v8.2.0: +Among many fixes and minor updates these are the most important features in v8.2.0: - Abstract render layer to make it easier to attach external draw engines - Add `LV_FLAD_OVERFLOW_VISIBLE`. If enabled the children of an object won't be clipped to the boundary of the object - Add ffmpeg decoder support to play videos and open a wide variety of image formats -- Add font fallback support +- Add font fallback support - Add gradient dithering support -- Add "monkey test" +- Add "monkey test" - Add cmsis-pack support - Add Grid navigation (`lv_gridnav`) @@ -23,7 +23,7 @@ The GPU support for NXP microcontrollers is still not updated to the new draw ar - :warning: feat(fs): add caching option for lv_fs-read [`2979`](https://github.com/littlevgl/lvgl/pull/2979) - :warning: feat(span): lv_spangroup_get_expand_width() adds a parameter [`2968`](https://github.com/littlevgl/lvgl/pull/2968) - :warning: arch(draw): allow replacing the draw engine [`db53ea9`](https://github.com/littlevgl/lvgl/commit/db53ea925c9502b20f38db0fc30c4ef599bdfc33) -- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead. +- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead. ### Architectural @@ -275,12 +275,12 @@ The GPU support for NXP microcontrollers is still not updated to the new draw ar ## [v8.1.0](https://github.com/lvgl/lvgl/compare/v8.0.2...v8.1.0) 10 November 2021 ### Overview -v8.1 is a minor release, so besides many fixes it contains a lot of new features too. +v8.1 is a minor release, so besides many fixes it contains a lot of new features too. Some of the most important features are - Built in support for SDL based GPU drawing - Much faster circle drawing in the software renderer -- Several [3rd party libraries](https://docs.lvgl.io/master/libs/index.html) are merged directly into LVGL. +- Several [3rd party libraries](https://docs.lvgl.io/master/libs/index.html) are merged directly into LVGL. - Add LVGL as an [RT-Thread](https://packages.rt-thread.org/en/detail.html?package=LVGL) and [ESP32](https://components.espressif.com/component/lvgl/lvgl) component ### Breaking Changes @@ -885,104 +885,104 @@ Some of the most important features are - fix(imgbtn) use the correct src in LV_EVENT_GET_SELF_SIZE - fix(color) remove extraneous cast for 8-bit color - fix(obj style) fix children reposition if the parent's padding changes. -- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER (#2372) -- fix(spinner) should not be clickable (#2373) -- fix(obj) improve how the focusing indev is determined -- fix(template) update indev template for v8 -- fix(printf) skip defining attribute if pycparser is used -- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332) -- fix(template) include lvgl.h in lv_port_*_template.c files -- fix(obj) detecting which indev sent LV_EVENT_FOCUS -- fix (span) fill LV_EVENT_GET_SELF_SIZE (#2360) -- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default -- fix (draw) fix arc bg image drawing with full arcs -- fix(disp) fix memory leak in lv_disp_remove (#2355) -- fix warnings introduced by 3fb8baf5 -- fix(widgets) use lv_obj_class for all the widgets +- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER (#2372) +- fix(spinner) should not be clickable (#2373) +- fix(obj) improve how the focusing indev is determined +- fix(template) update indev template for v8 +- fix(printf) skip defining attribute if pycparser is used +- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332) +- fix(template) include lvgl.h in lv_port_*_template.c files +- fix(obj) detecting which indev sent LV_EVENT_FOCUS +- fix (span) fill LV_EVENT_GET_SELF_SIZE (#2360) +- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default +- fix (draw) fix arc bg image drawing with full arcs +- fix(disp) fix memory leak in lv_disp_remove (#2355) +- fix warnings introduced by 3fb8baf5 +- fix(widgets) use lv_obj_class for all the widgets - fix(obj) move clean ups from lv_obj_del to lv_obj_destructor -- fix(roller) fix partial redraw of the selected area -- fix(roller) adjust the size of the selected area correctly -- fix(obj) delete useless type conversion (#2343) +- fix(roller) fix partial redraw of the selected area +- fix(roller) adjust the size of the selected area correctly +- fix(obj) delete useless type conversion (#2343) - fix(lv_obj_scroll.h) typos (#2345) - fix(scroll) fire LV_EVENT_SCROLL_BEGIN in the same spot for both axes -- fix(btnmatrix) fix button invalidation on focus change -- fix(textarea) style update in oneline mode + improve scroll to cursor -- fix(tlsf) do not use -- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set -- fix(refr) reduce the nesting level in lv_refr_area -- fix(txt) enhance the function of break_chars (#2327) -- fix(pxp): update RTOS macro for SDK 2.10 -- fix(vglite): update for v8 -- fix(pxp): update for v8 -- fix(flex) fix layout update and invalidation issues -- fix(flex) fix NULL pointer dereference -- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice -- fix(color) overflow with 16-bit color depth -- fix(coords) fix using large coordinates -- fix(chart) fix crash if no series are added -- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT +- fix(btnmatrix) fix button invalidation on focus change +- fix(textarea) style update in oneline mode + improve scroll to cursor +- fix(tlsf) do not use +- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set +- fix(refr) reduce the nesting level in lv_refr_area +- fix(txt) enhance the function of break_chars (#2327) +- fix(pxp): update RTOS macro for SDK 2.10 +- fix(vglite): update for v8 +- fix(pxp): update for v8 +- fix(flex) fix layout update and invalidation issues +- fix(flex) fix NULL pointer dereference +- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice +- fix(color) overflow with 16-bit color depth +- fix(coords) fix using large coordinates +- fix(chart) fix crash if no series are added +- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT - fix(align) fix lv_obj_align_to G -- fix(table) invalidate the table on cell value change -- fix(label) remove duplicated lv_obj_refresh_self_size -- fix(draw) underflow in subpixel font drawing -- fix (scroll) do not send unnecessary scroll end events +- fix(table) invalidate the table on cell value change +- fix(label) remove duplicated lv_obj_refresh_self_size +- fix(draw) underflow in subpixel font drawing +- fix (scroll) do not send unnecessary scroll end events ## v8.0.1 (14.06.2021) -- docs(filesystem) update to v8 7971ade4 -- fix(msgbox) create modals on top layer instead of act screen 5cf6303e -- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default 48d1c292 -- docs(grid) typo fix (#2310) 69d109d2 -- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino 1a62f7a6 -- fix(meter) fix needle image invalidation 54d8e817 -- fix(mem) add lv_ prefix to tlsf functions and types 0d52b59c -- fix(calendar) fix the position calculation today ad05e196 -- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE e697807c -- docs(color) language fixes (#2302) 07ecc9f1 -- fix(tick) minor optimization on lv_tick_inc call test b4305df5 -- Spelling and other language fixes to documentation (#2293) d0aaacaf -- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard 0be582b3 -- fix(scroll) keep the scroll position on object deleted 52edbb46 -- fix(msgbox) handle NULL btn map parameter 769c4a30 -- fix(group) allow refocusing objects 1520208b -- docs(overview) spelling fixes d2efb8c6 -- Merge branch 'master' of https://github.com/lvgl/lvgl 45960838 -- feat(timer) check if lv_tick_inc is called aa6641a6 -- feat(docs) add view on GitHub link a716ac6e -- fix(theme) fix the switch style in the default theme 0c0dc8ea -- docs fix typo 8ab80645 -- Merge branch 'master' of https://github.com/lvgl/lvgl e796448f -- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN ca54ecfe -- fix(tabview) fix with left and right tabs 17c57449 -- chore(docs) force docs rebuild 4a0f4139 -- chore(docs) always deploy master to docs/master as well 6d05692d -- fix(template) update lv_objx_template to v8 38bb8afc -- docs(extra) add extra/README.md 8cd504d5 -- Update CHANGELOG.md 48fd73d2 -- Update quick-overview.md (#2295) 5616471c -- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility 81f3068d -- adding micropython examples (#2286) c60ed68e -- docs(color) minor fix ac8f4534 -- fix(example) revert test code 77e2c1ff -- fix(draw) with additive blending with 32-bit color depth 786db2af -- docs(color) update colors' docs 9056b5ee -- Merge branch 'master' of https://github.com/lvgl/lvgl a711a1dd -- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers d0172f14 -- docs(lv_obj_style) update add_style and remove_style function headers (#2287) 60f7bcbf -- fix memory leak of spangroup (#2285) 33e0926a -- fix make lv_img_cache.h public because cache invalidation is public 38ebcd81 -- Merge branch 'master' of https://github.com/lvgl/lvgl 2b292495 -- fix(btnmatrix) fix focus event handling 3b58ef14 -- Merge pull request #2280 from lvgl/dependabot/pip/docs/urllib3-1.26.5 a2f45b26 -- fix(label) calculating the clip area 57e211cc -- chore(deps): bump urllib3 from 1.26.4 to 1.26.5 in /docs b2f77dfc -- fix(docs) add docs about the default group 29bfe604 +- docs(filesystem) update to v8 7971ade4 +- fix(msgbox) create modals on top layer instead of act screen 5cf6303e +- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default 48d1c292 +- docs(grid) typo fix (#2310) 69d109d2 +- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino 1a62f7a6 +- fix(meter) fix needle image invalidation 54d8e817 +- fix(mem) add lv_ prefix to tlsf functions and types 0d52b59c +- fix(calendar) fix the position calculation today ad05e196 +- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE e697807c +- docs(color) language fixes (#2302) 07ecc9f1 +- fix(tick) minor optimization on lv_tick_inc call test b4305df5 +- Spelling and other language fixes to documentation (#2293) d0aaacaf +- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard 0be582b3 +- fix(scroll) keep the scroll position on object deleted 52edbb46 +- fix(msgbox) handle NULL btn map parameter 769c4a30 +- fix(group) allow refocusing objects 1520208b +- docs(overview) spelling fixes d2efb8c6 +- Merge branch 'master' of https://github.com/lvgl/lvgl 45960838 +- feat(timer) check if lv_tick_inc is called aa6641a6 +- feat(docs) add view on GitHub link a716ac6e +- fix(theme) fix the switch style in the default theme 0c0dc8ea +- docs fix typo 8ab80645 +- Merge branch 'master' of https://github.com/lvgl/lvgl e796448f +- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN ca54ecfe +- fix(tabview) fix with left and right tabs 17c57449 +- chore(docs) force docs rebuild 4a0f4139 +- chore(docs) always deploy master to docs/master as well 6d05692d +- fix(template) update lv_objx_template to v8 38bb8afc +- docs(extra) add extra/README.md 8cd504d5 +- Update CHANGELOG.md 48fd73d2 +- Update quick-overview.md (#2295) 5616471c +- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility 81f3068d +- adding micropython examples (#2286) c60ed68e +- docs(color) minor fix ac8f4534 +- fix(example) revert test code 77e2c1ff +- fix(draw) with additive blending with 32-bit color depth 786db2af +- docs(color) update colors' docs 9056b5ee +- Merge branch 'master' of https://github.com/lvgl/lvgl a711a1dd +- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers d0172f14 +- docs(lv_obj_style) update add_style and remove_style function headers (#2287) 60f7bcbf +- fix memory leak of spangroup (#2285) 33e0926a +- fix make lv_img_cache.h public because cache invalidation is public 38ebcd81 +- Merge branch 'master' of https://github.com/lvgl/lvgl 2b292495 +- fix(btnmatrix) fix focus event handling 3b58ef14 +- Merge pull request #2280 from lvgl/dependabot/pip/docs/urllib3-1.26.5 a2f45b26 +- fix(label) calculating the clip area 57e211cc +- chore(deps): bump urllib3 from 1.26.4 to 1.26.5 in /docs b2f77dfc +- fix(docs) add docs about the default group 29bfe604 ## v8.0.0 (01.06.2021) v8.0 brings many new features like simplified and more powerful scrolling, new layouts inspired by CSS Flexbox and Grid, simplified and improved widgets, more powerful events, hookable drawing, and more. -v8 is a major change and therefore it's not backward compatible with v7. +v8 is a major change and therefore it's not backward compatible with v7. ### Directory structure - The `lv_` prefix is removed from the folder names @@ -1026,7 +1026,7 @@ v8 is a major change and therefore it's not backward compatible with v7. - `lv_disp_drv_t`, `lv_indev_drv_t`, `lv_fs_drv_t` needs to be `static` - `...disp_buf...` is renamed to `draw_buf`. See an initialization example [here](https://github.com/lvgl/lv_sim_eclipse_sdl/blob/release/v8.0/main.c#L128-L141). - No partial update if two screen sized buffers are set -- `disp_drv->full_refresh = 1` makes always the whole display redraw. +- `disp_drv->full_refresh = 1` makes always the whole display redraw. - `hor_res` and `ver_res` need to be set in `disp_drv` - `indev_read_cb` returns `void`. To indicate that there is more that to read set `data->continue_reading = 1` in the `read_cb` @@ -1055,7 +1055,7 @@ v8 is a major change and therefore it's not backward compatible with v7. - Use the new layouts instead of `lv_cont` features - Use `lv_obj` instead of `lv_page` - See the changes in [Colors](https://docs.lvgl.io/8.0/overview/color.html) - - The other parts are mainly minor renames and refactoring. See the functions' documentation for descriptions. + - The other parts are mainly minor renames and refactoring. See the functions' documentation for descriptions. ## v7.11.0 (16.03.2021) @@ -1069,7 +1069,7 @@ v8 is a major change and therefore it's not backward compatible with v7. ## v7.10.1 (16.02.2021) -### Bugfixes +### Bugfixes - fix(draw) overlap outline with background to prevent aliasing artifacts - fix(indev) clear the indev's `act_obj` in `lv_indev_reset` - fix(text) fix out of bounds read in `_lv_txt_get_width` @@ -1127,7 +1127,7 @@ v8 is a major change and therefore it's not backward compatible with v7. ## v7.8.0 (01.12.2020) ### New features -- make DMA2D non blocking +- make DMA2D non blocking - add unscii-16 built-in font - add KConfig - add lv_refr_get_fps_avg() @@ -1144,7 +1144,7 @@ v8 is a major change and therefore it's not backward compatible with v7. - fix(slider) adjusting the left knob too with encoder - fix reference to LV_DRAW_BUF_MAX_NUM in lv_mem.c - fix(polygon draw) join adjacent points if they are on the same coordinate -- fix(linemeter) fix invalidation when setting new value +- fix(linemeter) fix invalidation when setting new value - fix(table) add missing invalidation when changing cell type - refactor(roller) rename LV_ROLLER_MODE_INIFINITE -> LV_ROLLER_MODE_INFINITE @@ -1156,7 +1156,7 @@ v8 is a major change and therefore it's not backward compatible with v7. - label: Repair calculate back `dot` character logical error which cause infinite loop. - fix(theme_material): remove the bottom border from tabview header - fix(imgbtn) guess the closest available state with valid src -- fix(spinbox) update cursor position in lv_spinbox_set_step +- fix(spinbox) update cursor position in lv_spinbox_set_step ## v7.7.1 (03.11.2020) ### Bugfixes @@ -1201,7 +1201,7 @@ v8 is a major change and therefore it's not backward compatible with v7. - Check whether any style property has changed on a state change to decide if any redraw is required ### Bugfixes -- Fix selection of options with non-ASCII letters in dropdown list +- Fix selection of options with non-ASCII letters in dropdown list - Fix font loader to support LV_FONT_FMT_TXT_LARGE ## v7.5.0 (15.09.2020) @@ -1248,7 +1248,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k - Rename `lv_chart_clear_serie` to `lv_chart_clear_series` and `lv_obj_align_origo` to `lv_obj_align_mid` - Add linemeter's mirror feature again - Fix text decor (underline strikethrough) with older versions of font converter -- Fix setting local style property multiple times +- Fix setting local style property multiple times - Add missing background drawing and radius handling to image button - Allow adding extra label to list buttons - Fix crash if `lv_table_set_col_cnt` is called before `lv_table_set_row_cnt` for the first time @@ -1300,7 +1300,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k ### Bugfixes - `tileview` fix navigation when not screen sized -- Use 14px font by default to for better compatibility with smaller displays +- Use 14px font by default to for better compatibility with smaller displays - `linemeter` fix conversation of current value to "level" - Fix drawing on right border - Set the cursor image non-clickable by default @@ -1357,7 +1357,7 @@ The main new features of v7.4 are run-time font loading, style caching and arc k ### Bugfixes - Make Micropython working by adding the required variables as GC_ROOT -- Prefix some internal API functions with `_` to reduce the API of LVGL +- Prefix some internal API functions with `_` to reduce the API of LVGL - Fix built-in SimSun CJK font - Fix UTF-8 encoding when `LV_USE_ARABIC_PERSIAN_CHARS` is enabled - Fix DMA2D usage when 32 bit images directly blended @@ -1382,12 +1382,12 @@ The name of the project is changed to LVGL and the new website is on https://lvg LVGL remains free under the same conditions (MIT license) and a company is created to manage LVGL and offer services. ### New drawing system -Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects. +Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects. A possible use-case of this system is to remove the overflowing content from the rounded edges. It also allows drawing perfectly anti-aliased circles, lines, and arcs. -Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle). -When something is drawn the currently active masks can make some pixels transparent. -For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part. +Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle). +When something is drawn the currently active masks can make some pixels transparent. +For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part. The API in this regard remained the same but some new functions were added: - `lv_img_set_zoom`: set image object's zoom factor @@ -1397,12 +1397,12 @@ The API in this regard remained the same but some new functions were added: The new drawing engine brought new drawing features too. They are highlighted in the "style" section. ### New style system -The old style system is replaced with a new more flexible and lightweighted one. -It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object. -As part of these updates, a lot of objects were reworked and the APIs have been changed. +The old style system is replaced with a new more flexible and lightweighted one. +It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object. +As part of these updates, a lot of objects were reworked and the APIs have been changed. - more shadows options: *offset* and *spread* -- gradient stop position to shift the gradient area and horizontal gradient +- gradient stop position to shift the gradient area and horizontal gradient - `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE` blending modes - *clip corner*: crop the content on the rounded corners - *text underline* and *strikethrough* @@ -1446,16 +1446,16 @@ The following object types are renamed: - `linemeter`, `gauge`: can have background if the related style properties are set. Padding makes the scale/lines smaller. scale_border_width and scale_end_border_width allow to draw an arc on the outer part of the scale lines. - `gauge`: `lv_gauge_set_needle_img` allows use image as needle - `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` and rename `lv_canvas_rotate` to `lv_canvas_transform` -- `textarea`: If available in the font use bullet (`U+2022`) character in text area password +- `textarea`: If available in the font use bullet (`U+2022`) character in text area password ### New object types -- `lv_objmask`: masks can be added to it. The children will be masked accordingly. +- `lv_objmask`: masks can be added to it. The children will be masked accordingly. ### Others - Change the built-in fonts to [Montserrat](https://fonts.google.com/specimen/Montserrat) and add built-in fonts from 12 px to 48 px for every 2nd size. - Add example CJK and Arabic/Persian/Hebrew built-in font - Add ° and "bullet" to the built-in fonts -- Add Arabic/Persian script support: change the character according to its position in the text. +- Add Arabic/Persian script support: change the character according to its position in the text. - Add `playback_time` to animations. - Add `repeat_count` to animations instead of the current "repeat forever". - Replace `LV_LAYOUT_PRETTY` with `LV_LAYOUT_PRETTY_TOP/MID/BOTTOM` @@ -1472,4 +1472,4 @@ The following object types are renamed: - First and foremost, create a new `lv_conf.h` based on `lv_conf_template.h`. - To try the new version it suggested using a simulator project and see the examples. - If you have a running project, the most difficult part of the migration is updating to the new style system. Unfortunately, there is no better way than manually updating to the new format. -- The other parts are mainly minor renames and refactoring as described above. +- The other parts are mainly minor renames and refactoring as described above. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index b54398c322..f3ffee9ca8 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,5 +1,5 @@ ```eval_rst -.. include:: /header.rst +.. include:: /header.rst :github_url: |github_link_base|/CONTRIBUTING.md ``` @@ -9,22 +9,22 @@ Join LVGL's community and leave your footprint in the library! -There are a lot of ways to contribute to LVGL even if you are new to the library or even new to programming. +There are a lot of ways to contribute to LVGL even if you are new to the library or even new to programming. -It might be scary to make the first step but you have nothing to be afraid of. +It might be scary to make the first step but you have nothing to be afraid of. A friendly and helpful community is waiting for you. Get to know like-minded people and make something great together. So let's find which contribution option fits you the best and help you join the development of LVGL! Before getting started here are some guidelines to make contribution smoother: -- Be kind and friendly. +- Be kind and friendly. - Be sure to read the relevant part of the documentation before posting a question. - Ask questions in the [Forum](https://forum.lvgl.io/) and use [GitHub](https://github.com/lvgl/) for development-related discussions. - Always fill out the post or issue templates in the Forum or GitHub (or at least provide equivalent information). It makes understanding your contribution or issue easier and you will get a useful response faster. - If possible send an absolute minimal but buildable code example in order to reproduce the issue. Be sure it contains all the required variable declarations, constants, and assets (images, fonts). - Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your posts. You can learn it in 10 minutes. - Speak about one thing in one issue or topic. It makes your post easier to find later for someone with the same question. -- Give feedback and close the issue or mark the topic as solved if your question is answered. +- Give feedback and close the issue or mark the topic as solved if your question is answered. - For non-trivial fixes and features, it's better to open an issue first to discuss the details instead of sending a pull request directly. - Please read and follow the Coding style guide. @@ -32,7 +32,7 @@ Before getting started here are some guidelines to make contribution smoother: Merging new code into the lvgl, documentation, blog, examples, and other repositories happen via *Pull requests* (PR for short). A PR is a notification like "Hey, I made some updates to your project. Here are the changes, you can add them if you want." -To do this you need a copy (called fork) of the original project under your account, make some changes there, and notify the original repository about your updates. +To do this you need a copy (called fork) of the original project under your account, make some changes there, and notify the original repository about your updates. You can see what it looks like on GitHub for LVGL here: [https://github.com/lvgl/lvgl/pulls](https://github.com/lvgl/lvgl/pulls). To add your changes you can edit files online on GitHub and send a new Pull request from there (recommended for small changes) or @@ -48,13 +48,13 @@ To add your changes you can edit files online on GitHub and send a new Pull requ ### From command line The instructions describe the main `lvgl` repository but it works the same way for the other repositories. -1. Fork the [lvgl repository](https://github.com/lvgl/lvgl). To do this click the "Fork" button in the top right corner. +1. Fork the [lvgl repository](https://github.com/lvgl/lvgl). To do this click the "Fork" button in the top right corner. It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/?tab=repositories`) 2. Clone your forked repository. -3. Add your changes. You can create a *feature branch* from *master* for the updates: `git checkout -b the-new-feature` +3. Add your changes. You can create a *feature branch* from *master* for the updates: `git checkout -b the-new-feature` 4. Commit and push your changes to the forked `lvgl` repository. 5. Create a PR on GitHub from the page of your `lvgl` repository (`https://github.com//lvgl`) by clicking the *"New pull request"* button. Don't forget to select the branch where you added your changes. -7. Set the base branch. It means where you want to merge your update. In the `lvgl` repo both the fixes and new features go to `master` branch. +7. Set the base branch. It means where you want to merge your update. In the `lvgl` repo both the fixes and new features go to `master` branch. 8. Describe what is in the update. An example code is welcome if applicable. 9. If you need to make more changes, just update your forked `lvgl` repo with new commits. They will automatically appear in the PR. @@ -72,7 +72,7 @@ The following structure should be used: Possible ``s: - `fix` bugfix in the source code. -- `feat` new feature +- `feat` new feature - `arch` architectural changes - `perf` changes that affect the performance - `example` anything related to examples (even fixes and new examples) @@ -91,8 +91,8 @@ For example `img`, `layout`, `txt`, `anim`. The scope can be omitted. `` optional and can be used to describe the details of this change. -`