Keep consistent naming with LVGL
This commit is contained in:
parent
469fdf2508
commit
88d7d426ca
3 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ use embedded_graphics_simulator::{
|
|||
OutputSettingsBuilder, SimulatorDisplay, SimulatorEvent, Window,
|
||||
};
|
||||
use lvgl::style::Style;
|
||||
use lvgl::widgets::{Button, Label};
|
||||
use lvgl::widgets::{Btn, Label};
|
||||
use lvgl::{self, Align, Color, DisplayDriver, Event, Object, Part, State, UI};
|
||||
use lvgl_sys;
|
||||
use std::sync::{mpsc, Arc, Mutex};
|
||||
|
@ -34,7 +34,7 @@ fn main() -> Result<(), String> {
|
|||
screen.add_style(Part::Main, screen_style);
|
||||
|
||||
// Create the button
|
||||
let mut button = Button::new(&mut screen);
|
||||
let mut button = Btn::new(&mut screen);
|
||||
button.set_align(&mut screen, Align::InLeftMid, 30, 0);
|
||||
button.set_size(180, 80);
|
||||
let mut btn_lbl = Label::new(&mut button);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{GenericObject, NativeObject, Object};
|
||||
use core::ptr;
|
||||
|
||||
define_object!(Button, lv_btn_create);
|
||||
define_object!(Btn, lv_btn_create);
|
|
@ -1,9 +1,9 @@
|
|||
mod bar;
|
||||
mod button;
|
||||
mod btn;
|
||||
mod gauge;
|
||||
mod label;
|
||||
|
||||
pub use self::bar::*;
|
||||
pub use self::button::*;
|
||||
pub use self::btn::*;
|
||||
pub use self::gauge::*;
|
||||
pub use self::label::*;
|
||||
|
|
Loading…
Reference in a new issue