Keep consistent naming with LVGL

This commit is contained in:
Rafael Caricio 2020-06-05 22:47:13 +02:00
parent 469fdf2508
commit 88d7d426ca
3 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -1,4 +1,4 @@
use crate::{GenericObject, NativeObject, Object};
use core::ptr;
define_object!(Button, lv_btn_create);
define_object!(Btn, lv_btn_create);

View file

@ -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::*;