acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_example_style_12.c (628B)

      1 #include "../lv_examples.h"
      2 #if LV_BUILD_EXAMPLES && LV_USE_IMG
      3 
      4 /**
      5  * Local styles
      6  */
      7 void lv_example_style_12(void)
      8 {
      9     static lv_style_t style;
     10     lv_style_init(&style);
     11     lv_style_set_bg_color(&style, lv_palette_main(LV_PALETTE_GREEN));
     12     lv_style_set_border_color(&style, lv_palette_lighten(LV_PALETTE_GREEN, 3));
     13     lv_style_set_border_width(&style, 3);
     14 
     15     lv_obj_t * obj = lv_obj_create(lv_scr_act());
     16     lv_obj_add_style(obj, &style, 0);
     17 
     18     /*Overwrite the background color locally*/
     19     lv_obj_set_style_bg_color(obj, lv_palette_main(LV_PALETTE_ORANGE), LV_PART_MAIN);
     20 
     21     lv_obj_center(obj);
     22 }
     23 
     24 #endif