Lines Matching full:to

7 Styles are used to set the appearance of Widgets.  Styles in LVGL are
10 border width, font, text color and so on. It's similar to a ``class`` in CSS.
12 - Styles can be assigned to Widgets to change their appearance. Upon
15 ``style_blue`` to the knob of a slider when it's in pressed state.
17 - Styles can be cascaded which means multiple styles may be assigned to a Widget and
19 have to be specified in a style. LVGL will search for a property until a
22 and ``style_btn_red`` can add only a ``background-color=red`` to
29 in LVGL a property is assigned to a given state.
58 A style can be added to any state or state combination. For example,
68 A higher value means higher precedence. To determine which state's
69 property to use let's take an example. Imagine the background color is
80 with white (default is related to every state) and pressed with gray.
89 5. It's possible to set e.g. rose color for :cpp:expr:`LV_STATE_PRESSED | LV_STATE_FOCUSED`.
92 6. When the Widget is in the checked state there is no property to set
100 want to see if it's pressed, therefore the pressed state has a higher
103 - If you want to set a property for all states (e.g. red background color)
105 for its current state it will fall back to the default state's property.
106 - Use ORed states to describe the properties for complex cases (e.g.
108 - It might be a good idea to use different
122 It's not required to set all the properties in one style. It's possible
123 to add more styles to a Widget and have the latter added style modify
153 Some properties (typically those related to text) can be inherited from
158 property. The parents will use their own state to determine the value.
176 - :cpp:enumerator:`LV_PART_KNOB`: Like a handle to grab to adjust a value
189 later how to add styles to Widgets and parts.
222 To remove a property use:
228 To get a property's value from a style:
239 on the type of property it is applied to:
245 To reset a style (free all its data) use:
251 Styles can be built as ``const`` as well to save RAM:
270 Add and remove styles to a widget
273 A style on its own has no effect until it is added (assigned) to a Widget.
279 To add a style to a Widget use
281 OR-ed value of parts and state to which the style should be added. Some
295 …lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); /* Overwrite only some colors to red whe…
300 To replace a specific style of a Widget use
321 To remove all styles from a Widget use :cpp:expr:`lv_obj_remove_style_all(widget)`.
323 To remove specific styles use
326 :cpp:func:`lv_obj_add_style`. ``style`` can be ``NULL`` to check only the
328 the :cpp:enumerator:`LV_STATE_ANY` and :cpp:enumerator:`LV_PART_ANY` values to remove the style from
334 If a style which is already assigned to a Widget changes (i.e. a
336 notified. There are 3 options to do this:
343To refresh all parts and properties use :cpp:expr:`lv_obj_refresh_style(widget, LV_PART_ANY, LV_ST…
344 3. To make LVGL check all Widgets to see if they use a style and refresh them
351 To get the final value of a style's property considering
372 In addition to "normal" styles, Widgets can also store local styles.
373 This concept is similar to inline styles in CSS
378 freed when the Widget is deleted. They are useful to add local
379 customization to a Widget.
381 Unlike in CSS, LVGL local styles can be assigned to states
384 To set a local property use functions like
408 background properties" are the properties being referred to:
429 transitions it's possible to play an animation on state change. For
430 example, on pressing a button its background color can be animated to
434 possible to set
439 - the properties to animate
443 the Widget goes to the default state a 500 ms transition time is
445 100 ms transition when going to the pressed state. This example
446 configuration results in going to the pressed state quickly and then
447 going back to default slowly.
449 To describe a transition an :cpp:struct:`lv_transition_dsc_t` variable needs to be
450 initialized and added to a style:
473 ``transform_zoom`` properties are set to a non-default value LVGL
474 creates a snapshot of the widget and its children in order to
482 If only ``opa`` and/or ``blend_mode`` is set to a non-default value LVGL
486 …ER_SIMPLE_BUF_SIZE`: [bytes] the optimal target buffer size. LVGL will try to allocate this size o…
490 rendered in chunks, but one larger memory block needs to be allocated. The
492 size of the area to redraw, but it's never larger than the size of the
495 If the widget can fully cover the area to redraw, LVGL creates an RGB
496 layer (which is faster to render and uses less memory). If the opposite
497 case ARGB rendering needs to be used, a widget might not cover its area
519 applies it to every newly-created widget. This will give a default appearance
520 to the UI which can then be modified by adding further styles.
526 To set a theme for a display, two steps are required:
529 2. Assign the initialized theme to a display.
532 example shows how to set the "default" theme:
544 lv_display_set_theme(display, th); /* Assign theme to display */