chore(style): remove the trailing space from all source files (#3188)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-03-21 18:25:51 +08:00
committed by GitHub
parent 46bd054ad4
commit 4c4f954059
223 changed files with 1719 additions and 1719 deletions

View File

@@ -1,5 +1,5 @@
```eval_rst
.. include:: /header.rst
.. include:: /header.rst
:github_url: |github_link_base|/overview/object.md
```
# Objects
@@ -73,7 +73,7 @@ lv_obj_set_pos(obj1, 10, 10); /*Set the position of the new
Modify the position of the parent:
![](/misc/par_child2.png "Graphical objects are moving together 2")
![](/misc/par_child2.png "Graphical objects are moving together 2")
```c
lv_obj_set_pos(parent, 50, 50); /*Move the parent. The child will move with it.*/
@@ -85,7 +85,7 @@ lv_obj_set_pos(parent, 50, 50); /*Move the parent. The child will move with it.*
If a child is partially or fully outside its parent then the parts outside will not be visible.
![](/misc/par_child3.png "A graphical object is visible on its parent")
![](/misc/par_child3.png "A graphical object is visible on its parent")
```c
lv_obj_set_x(obj1, -30); /*Move the child a little bit off the parent*/
@@ -101,7 +101,7 @@ In LVGL, objects can be created and deleted dynamically at run time. It means on
This allows for the creation of a screen just when a button is clicked to open it, and for deletion of screens when a new screen is loaded.
UIs can be created based on the current environment of the device. For example one can create meters, charts, bars and sliders based on the currently attached sensors.
Every widget has its own **create** function with a prototype like this:
```c
lv_obj_t * lv_<widget>_create(lv_obj_t * parent, <other parameters if any>);
@@ -124,7 +124,7 @@ This is useful e.g. if you want to delete the parent of an object in the child's
You can remove all the children of an object (but not the object itself) using `lv_obj_clean(obj)`.
You can use `lv_obj_del_delayed(obj, 1000)` to delete an object after some time. The delay is expressed in milliseconds.
You can use `lv_obj_del_delayed(obj, 1000)` to delete an object after some time. The delay is expressed in milliseconds.
## Screens
@@ -140,7 +140,7 @@ Screens can be created with any object type. For example, a [Base object](/widge
### Get the active screen
There is always an active screen on each display. By default, the library creates and loads a "Base object" as a screen for each display.
To get the currently active screen use the `lv_scr_act()` function.
To get the currently active screen use the `lv_scr_act()` function.
### Load screens
@@ -182,7 +182,7 @@ Visit [Multi-display support](/overview/display) to learn more.
## Parts
The widgets are built from multiple parts. For example a [Base object](/widgets/obj) uses the main and scrollbar parts but a [Slider](/widgets/core/slider) uses the main, indicator and knob parts.
The widgets are built from multiple parts. For example a [Base object](/widgets/obj) uses the main and scrollbar parts but a [Slider](/widgets/core/slider) uses the main, indicator and knob parts.
Parts are similar to *pseudo-elements* in CSS.
The following predefined parts exist in LVGL:
@@ -196,15 +196,15 @@ The following predefined parts exist in LVGL:
- `LV_PART_CURSOR` Mark a specific place e.g. text area's or chart's cursor
- `LV_PART_CUSTOM_FIRST` Custom parts can be added from here.
The main purpose of parts is to allow styling the "components" of the widgets.
The main purpose of parts is to allow styling the "components" of the widgets.
They are described in more detail in the [Style overview](/overview/style) section.
## States
The object can be in a combination of the following states:
- `LV_STATE_DEFAULT` Normal, released state
- `LV_STATE_CHECKED` Toggled or checked state
- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
- `LV_STATE_EDITED` Edit by an encoder
- `LV_STATE_HOVERED` Hovered by mouse (not supported now)
- `LV_STATE_PRESSED` Being pressed
@@ -215,8 +215,8 @@ The object can be in a combination of the following states:
- `LV_STATE_USER_3` Custom state
- `LV_STATE_USER_4` Custom state
The states are usually automatically changed by the library as the user interacts with an object (presses, releases, focuses, etc.).
However, the states can be changed manually too.
The states are usually automatically changed by the library as the user interacts with an object (presses, releases, focuses, etc.).
However, the states can be changed manually too.
To set or clear given state (but leave the other states untouched) use `lv_obj_add/clear_state(obj, LV_STATE_...)`
In both cases OR-ed state values can be used as well. E.g. `lv_obj_add_state(obj, part, LV_STATE_PRESSED | LV_PRESSED_CHECKED)`.