minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-03-25 19:59:23 +01:00
parent 35c55291e3
commit 63bc72e53a
10 changed files with 54 additions and 37 deletions

View File

@@ -1,11 +1,11 @@
//#include "../../../lvgl.h"
//#if LV_USE_BAR && LV_BUILD_EXAMPLES
//
#include "../../../lvgl.h"
#if LV_USE_BAR && LV_BUILD_EXAMPLES
//static void set_value(void *bar, int32_t v)
//{
// lv_bar_set_value(bar, v, LV_ANIM_OFF);
//}
//
//static void event_cb(lv_obj_t * obj, lv_event_t e)
//{
// if(e == LV_EVENT_DRAW_POST_END) {
@@ -42,12 +42,12 @@
// lv_draw_label(&txt_area, clip_area, &dsc, buf, NULL);
// }
//}
//
///**
// * Custom drawer on bar to display the current value
// */
//void lv_example_bar_6(void)
//{
/**
* Custom drawer on bar to display the current value
*/
void lv_example_bar_6(void)
{
// static lv_style_t style_bg;
// lv_style_init(&style_bg);
// lv_style_set_content_ofs_y(&style_bg, -3);
@@ -67,7 +67,7 @@
// lv_anim_set_playback_time(&a, 2000);
// lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE);
// lv_anim_start(&a);
//
//}
//
//#endif
}
#endif

View File

@@ -33,5 +33,6 @@ void lv_example_btn_1(void)
label = lv_label_create(btn2);
lv_label_set_text(label, "Toggle");
lv_obj_center(label);
lv_label_set_text(label, "Togglasdasasdasdase");
}
#endif

View File

@@ -1,4 +1,4 @@
//#include "../../../lvgl.h"
#include "../../../lvgl.h"
//#if LV_USE_SLIDER && LV_BUILD_EXAMPLES
//
//static void slider_event_cb(lv_obj_t * slider, lv_event_t event);
@@ -9,8 +9,8 @@
///**
// * Show the current value when the slider if pressed using a fancy style transition.
// */
//void lv_example_slider_2(void)
//{
void lv_example_slider_2(void)
{
// lv_style_init(&style_def);
// lv_style_set_content_opa(&style_def, LV_OPA_TRANSP);
// lv_style_set_content_align(&style_def, LV_ALIGN_OUT_TOP_MID);
@@ -27,7 +27,7 @@
//
// lv_obj_add_style(slider, LV_PART_KNOB, LV_STATE_DEFAULT, &style_def);
// lv_obj_add_style(slider, LV_PART_KNOB, LV_STATE_PRESSED, &style_pr);
//}
}
//
//static void slider_event_cb(lv_obj_t * slider, lv_event_t event)
//{

View File

@@ -1,4 +1,4 @@
//#include "../../../lvgl.h"
#include "../../../lvgl.h"
//#if LV_USE_SLIDER && LV_BUILD_EXAMPLES
//
//static void slider_event_cb(lv_obj_t * slider, lv_event_t event);
@@ -7,8 +7,8 @@
// * Show the current value when the slider if pressed (using only styles).
// *
// */
//void lv_example_slider_3(void)
//{
void lv_example_slider_3(void)
{
// /*Create a slider in the center of the display*/
// lv_obj_t * slider;
// slider = lv_slider_create(lv_scr_act());
@@ -25,7 +25,7 @@
//
// /*To update the value text*/
// lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL);
//}
}
//
//static void slider_event_cb(lv_obj_t * slider, lv_event_t event)
//{