TEST

Dependencies:   TS_DISCO_F746NG mbed LCD_DISCO_F746NG BSP_DISCO_F746NG lvgl_RB FastPWM millis

Files at this revision

API Documentation at this revision

Comitter:
kisvegabor
Date:
Fri Jan 17 06:32:53 2020 +0000
Parent:
2:0ded70ebbc36
Child:
4:6a3d12663549
Commit message:
Add btn style change example

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jan 17 06:10:21 2020 +0000
+++ b/main.cpp	Fri Jan 17 06:32:53 2020 +0000
@@ -655,17 +655,19 @@
     lv_obj_set_pos(SousMenu, 0, 40);
 
     lv_style_copy(&Style_BPSM, &lv_style_btn_rel);    
- //   Style_BPSM.text.font = &lv_font_roboto_12;  
- //   Style_BPSM.body.padding.top    = LV_DPI / 40;
- //   Style_BPSM.body.padding.bottom = LV_DPI / 40;  
+    Style_BPSM.text.font = &lv_font_roboto_12;  
+    Style_BPSM.body.main_color    = LV_COLOR_RED;
+    Style_BPSM.body.padding.top    = LV_DPI / 40;
+    Style_BPSM.body.padding.bottom = LV_DPI / 40;  
  //    GABOR: How to change the height of button in a list ?
  //    ROMAIN: You need to modify the paddings. See here: https://docs.littlevgl.com/en/html/object-types/list.html#style-usage
- //            Your intention with looked good you just need to apply it with lv_btn_Set_style(SM101, LV_BRN_STYLE_REL, &Style_BPSM);
+ //            Your intention with looked good you just need to apply it with lv_btn_set_style(SM101, LV_BTN_STYLE_REL, &Style_BPSM);
     
     //SOUS MENU 100
     if (Num==100){
         AnimSousMenu=200;//TAILLE FENETRE
         SM101 = lv_list_add_btn(SousMenu, NULL, "SM101");   
+        lv_btn_set_style(SM101, LV_BTN_STYLE_REL, &Style_BPSM);
         if (UserEC.Niveau<0){lv_btn_set_state(SM101, LV_BTN_STATE_INA );}
         lv_obj_set_event_cb(SM101, SM101_ACT);