Skip to content

Commit 75629e2

Browse files
committed
update style doc
1 parent 5581ac4 commit 75629e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lvgl/src/lv_core/style.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
//! Objects in LVGL can have associated styling information. After a `Style` is
44
//! created and configured, it can be added to any object or widget:
55
//! ```
6-
//! use lvgl::{Color, Widget};
6+
//! use lvgl::Color;
77
//! use lvgl::style::Style;
88
//!
99
//! let mut my_style = Style::default();
1010
//! my_style.set_text_color(Color::from_rgb((0, 0, 0)));
1111
//!
12-
//! //my_widget.add_style(Part::Main, &mut my_style).unwrap();
13-
//! // ...
12+
//! my_widget.add_style(my_style.into_raw(), Part::Main.into());
1413
//! ```
1514
//! All methods on the `Style` type directly lower to their C LVGL
1615
//! counterparts.

0 commit comments

Comments
 (0)