diff --git a/examples/components/buttons/button_default.xml b/examples/components/buttons/button_default.xml
index ffc6ad1..c2e4cb9 100644
--- a/examples/components/buttons/button_default.xml
+++ b/examples/components/buttons/button_default.xml
@@ -6,17 +6,10 @@
+ bg_color="0x222222" bg_opa="255" width="content" height="content" radius="12" pad_hor="24" pad_ver="12"
+ shadow_width="0"/>
diff --git a/examples/components/buttons/button_default_gen.c b/examples/components/buttons/button_default_gen.c
index fe140f3..3e02a14 100644
--- a/examples/components/buttons/button_default_gen.c
+++ b/examples/components/buttons/button_default_gen.c
@@ -44,17 +44,27 @@ lv_obj_t * button_default_create(lv_obj_t * parent, const char * button_label)
lv_style_init(&style_main);
lv_style_set_bg_color(&style_main, lv_color_hex(0x222222));
+ lv_style_set_bg_opa(&style_main, 255);
+ lv_style_set_width(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_main, 12);
lv_style_set_pad_hor(&style_main, 24);
lv_style_set_pad_ver(&style_main, 12);
- lv_style_set_border_width(&style_main, 0);
- lv_style_set_radius(&style_main, 12);
lv_style_set_shadow_width(&style_main, 0);
lv_style_init(&style_pr);
lv_style_set_bg_color(&style_pr, lv_color_hex(0x333333));
+ lv_style_set_bg_opa(&style_pr, 255);
+ lv_style_set_width(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_pr, 12);
lv_style_set_shadow_width(&style_pr, 20);
lv_style_set_shadow_color(&style_pr, lv_color_hex(0x000000));
- lv_style_set_shadow_opa(&style_pr, 40);
+ lv_style_set_shadow_opa(&style_pr, 102);
+ lv_style_set_shadow_offset_x(&style_pr, 0);
+ lv_style_set_shadow_offset_y(&style_pr, 4);
+ lv_style_set_pad_hor(&style_pr, 24);
+ lv_style_set_pad_ver(&style_pr, 12);
style_inited = true;
}
diff --git a/examples/components/buttons/button_error.xml b/examples/components/buttons/button_error.xml
index 95d7d30..a6b76bc 100644
--- a/examples/components/buttons/button_error.xml
+++ b/examples/components/buttons/button_error.xml
@@ -6,18 +6,11 @@
diff --git a/examples/components/buttons/button_error_gen.c b/examples/components/buttons/button_error_gen.c
index 0754dc6..991baf9 100644
--- a/examples/components/buttons/button_error_gen.c
+++ b/examples/components/buttons/button_error_gen.c
@@ -44,17 +44,27 @@ lv_obj_t * button_error_create(lv_obj_t * parent, const char * button_label)
lv_style_init(&style_main);
lv_style_set_bg_color(&style_main, lv_color_hex(0xf03c0f));
+ lv_style_set_bg_opa(&style_main, 255);
+ lv_style_set_width(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_main, 12);
lv_style_set_pad_hor(&style_main, 24);
lv_style_set_pad_ver(&style_main, 12);
- lv_style_set_border_width(&style_main, 0);
- lv_style_set_radius(&style_main, 12);
lv_style_set_shadow_width(&style_main, 0);
lv_style_init(&style_pr);
lv_style_set_bg_color(&style_pr, lv_color_hex(0xfc5f38));
+ lv_style_set_bg_opa(&style_pr, 255);
+ lv_style_set_width(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_pr, 12);
lv_style_set_shadow_width(&style_pr, 20);
lv_style_set_shadow_color(&style_pr, lv_color_hex(0x000000));
- lv_style_set_shadow_opa(&style_pr, 40);
+ lv_style_set_shadow_opa(&style_pr, 102);
+ lv_style_set_shadow_offset_x(&style_pr, 0);
+ lv_style_set_shadow_offset_y(&style_pr, 4);
+ lv_style_set_pad_hor(&style_pr, 24);
+ lv_style_set_pad_ver(&style_pr, 12);
style_inited = true;
}
diff --git a/examples/components/buttons/button_warning.xml b/examples/components/buttons/button_warning.xml
index c0fc578..64b8b76 100644
--- a/examples/components/buttons/button_warning.xml
+++ b/examples/components/buttons/button_warning.xml
@@ -6,19 +6,11 @@
diff --git a/examples/components/buttons/button_warning_gen.c b/examples/components/buttons/button_warning_gen.c
index d6cbd90..60b7ee0 100644
--- a/examples/components/buttons/button_warning_gen.c
+++ b/examples/components/buttons/button_warning_gen.c
@@ -44,18 +44,27 @@ lv_obj_t * button_warning_create(lv_obj_t * parent, const char * button_label)
lv_style_init(&style_main);
lv_style_set_bg_color(&style_main, lv_color_hex(0xf0b005));
+ lv_style_set_bg_opa(&style_main, 255);
+ lv_style_set_width(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_main, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_main, 12);
lv_style_set_pad_hor(&style_main, 24);
lv_style_set_pad_ver(&style_main, 12);
- lv_style_set_border_width(&style_main, 0);
- lv_style_set_radius(&style_main, 12);
lv_style_set_shadow_width(&style_main, 0);
- lv_style_set_text_color(&style_main, lv_color_hex(0x111111));
lv_style_init(&style_pr);
lv_style_set_bg_color(&style_pr, lv_color_hex(0xf9ca4e));
+ lv_style_set_bg_opa(&style_pr, 255);
+ lv_style_set_width(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_height(&style_pr, LV_SIZE_CONTENT);
+ lv_style_set_radius(&style_pr, 12);
lv_style_set_shadow_width(&style_pr, 20);
lv_style_set_shadow_color(&style_pr, lv_color_hex(0x000000));
- lv_style_set_shadow_opa(&style_pr, 40);
+ lv_style_set_shadow_opa(&style_pr, 102);
+ lv_style_set_shadow_offset_x(&style_pr, 0);
+ lv_style_set_shadow_offset_y(&style_pr, 4);
+ lv_style_set_pad_hor(&style_pr, 24);
+ lv_style_set_pad_ver(&style_pr, 12);
style_inited = true;
}
diff --git a/examples/components/scratchpad.xml b/examples/components/scratchpad.xml
index 6ba802e..c2b9317 100644
--- a/examples/components/scratchpad.xml
+++ b/examples/components/scratchpad.xml
@@ -1,18 +1,18 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/components/scratchpad_gen.c b/examples/components/scratchpad_gen.c
index 22629bf..8b45620 100644
--- a/examples/components/scratchpad_gen.c
+++ b/examples/components/scratchpad_gen.c
@@ -47,36 +47,37 @@ lv_obj_t * scratchpad_create(lv_obj_t * parent)
lv_obj_t * lv_obj = lv_obj_create(parent);
- lv_obj_set_width(lv_obj, lv_pct(100));
+ lv_obj_set_width(lv_obj, lv_pct(50));
lv_obj_set_height(lv_obj, lv_pct(100));
lv_obj_set_flex_flow(lv_obj, LV_FLEX_FLOW_COLUMN);
+ lv_obj_set_style_bg_color(lv_obj, lv_color_hex(0x114488), LV_PART_MAIN | LV_STATE_DEFAULT);
- lv_obj_t * button_default_1 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_1, 250);
+ lv_obj_t * button_default_1 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_1, lv_pct(100));
- lv_obj_t * button_default_2 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_2, 250);
+ lv_obj_t * button_default_2 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_2, lv_pct(100));
- lv_obj_t * button_default_3 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_3, 250);
+ lv_obj_t * button_default_3 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_3, lv_pct(100));
- lv_obj_t * button_error_1 = button_error_create(lv_obj, "Button");
- lv_obj_set_width(button_error_1, 250);
+ lv_obj_t * button_error_1 = button_error_create(lv_obj, "Hello");
+ lv_obj_set_width(button_error_1, lv_pct(100));
- lv_obj_t * button_warning_1 = button_warning_create(lv_obj, "Button");
- lv_obj_set_width(button_warning_1, 250);
+ lv_obj_t * button_warning_1 = button_warning_create(lv_obj, "Hello");
+ lv_obj_set_width(button_warning_1, lv_pct(100));
- lv_obj_t * button_default_4 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_4, 250);
+ lv_obj_t * button_default_4 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_4, lv_pct(100));
- lv_obj_t * button_default_5 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_5, 250);
+ lv_obj_t * button_default_5 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_5, lv_pct(100));
- lv_obj_t * button_default_6 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_6, 250);
+ lv_obj_t * button_default_6 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_6, lv_pct(100));
- lv_obj_t * button_default_7 = button_default_create(lv_obj, "Button");
- lv_obj_set_width(button_default_7, 250);
+ lv_obj_t * button_default_7 = button_default_create(lv_obj, "Hello");
+ lv_obj_set_width(button_default_7, lv_pct(100));
diff --git a/examples/components/scratchpad_gen.h b/examples/components/scratchpad_gen.h
index e182506..6d88d6f 100644
--- a/examples/components/scratchpad_gen.h
+++ b/examples/components/scratchpad_gen.h
@@ -31,7 +31,7 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
-#define SCRATCHPAD_LONG 250
+#define SCRATCHPAD_LONG 100%
lv_obj_t * scratchpad_create(lv_obj_t * parent);
/**********************