-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the first version of the v0.1 examples
- Loading branch information
1 parent
a1ba02b
commit 500f8d6
Showing
26 changed files
with
676 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component> | ||
<api> | ||
<prop name="text" type="string" default="Muhaha"/> | ||
<prop name="my_width" type="int" default="100"/> | ||
</api> | ||
<styles> | ||
<style name="main" bg_color="0x22222" border_width="2" border_color="0x333333" radius="100"/> | ||
</styles> | ||
<view extends="lv_button" styles="main" width="$my_width"> | ||
<h2 text="$text" align="center"/> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<component> | ||
<params> | ||
<string name="text"/> | ||
</params> | ||
<styles> | ||
<style name="main" bg_color="0xff3322" text_color="0xffffff" border_color="0x333333" radius="100"/> | ||
</styles> | ||
<view extends="button_default" styles="main" text="$text"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<component> | ||
<params> | ||
<string name="text"/> | ||
</params> | ||
<styles> | ||
<style name="main" bg_color="0xffbb44" text_color="0x000000" border_color="0x333333" radius="100"/> | ||
</styles> | ||
<view extends="button_default" styles="main" text="$text"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<component> | ||
<params> | ||
<string name="text"/> | ||
</params> | ||
<styles> | ||
<style name="main" | ||
bg_color="0x333333" bg_opa="255" | ||
border_width="2" border_color="0xaaaaaa" | ||
radius="100" | ||
width="100"/> | ||
<style name="light_knob" | ||
bg_color="0xeeeeee" bg_opa="255" | ||
border_width="2" border_color="0xaaaaaa" /> | ||
<style name="blue_indicator" | ||
bg_color="0x0000ff" bg_opa="255"/> | ||
</styles> | ||
<view extends="lv_slider" | ||
styles="main light_knob:knob blue_indicator:indicator" | ||
align="center"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<component> | ||
<styles> | ||
<style name="main" text_font="lv_montserrat_18" /> | ||
</styles> | ||
<view extends="lv_label" styles="main"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<component> | ||
<styles> | ||
<style name="main" text_font="lv_montserrat_16"/> | ||
</styles> | ||
<view extends="lv_label" styles="main" text="$text"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<component> | ||
<styles> | ||
<style name="main" text_font="lv_montserrat_14" /> | ||
</styles> | ||
<view extends="lv_label" styles="main"> | ||
</view> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<component> | ||
<styles> | ||
<style name="main" border_width="2" bg_opa="0" layout="flex" flex_flow="row"/> | ||
</styles> | ||
<view extends="lv_obj" styles="main" flex_flow="row"> | ||
</view> | ||
</component> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<globals> | ||
<images> | ||
<data name="screenshot" src_path="A:/images/lvgl.png" file_format="png"/> | ||
<data name="wink" src_path="A:/images/wink.png" file_format="png"/> | ||
</images> | ||
<fonts> | ||
<tinyttf name="arial_14" src_path="A:/fonts/arial.ttf" size="14"/> | ||
<tinyttf name="arial_18" src_path="A:/fonts/arial.ttf" size="18"/> | ||
<tinyttf name="arial_22" src_path="A:/fonts/arial.ttf" size="22"/> | ||
</fonts> | ||
</globals> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<tests name="Some name" help="Description about the batch of tests below."> | ||
<test name="test subjects" help="Some description"> | ||
<styles> | ||
<style name="black" bg_color="0x000000" /> | ||
<style name="white" bg_color="0xFFFFFF" /> | ||
<style name="secondary" bg_color="0x2196F3" /> | ||
<style name="green" bg_color="0x4CAF50" /> | ||
<style name="purple" bg_color="0x800080" width="100"/> | ||
<style name="red" bg_color="0xff0000" width="100"/> | ||
</styles> | ||
<view extends="lv_obj" width="250" height="200" styles="red"> | ||
<CustomButton buttontext="Not Red" styles="purple" x="25" y="25"/> | ||
</view> | ||
</test> | ||
|
||
<test name="test in list with different sizes" help="Some description"> | ||
<styles> | ||
<style name="black" bg_color="0x000000" /> | ||
<style name="white" bg_color="0xFFFFFF" /> | ||
<style name="secondary" bg_color="0x2196F3" /> | ||
<style name="green" bg_color="0x4CAF50" /> | ||
<style name="purple" bg_color="0x800080" width="100"/> | ||
<style name="red" bg_color="0xff0000" width="100"/> | ||
</styles> | ||
<view extends="lv_obj" width="250" height="200" styles="purple"> | ||
<CustomButton buttontext="Not Purple" styles="red" x="25" y="25"/> | ||
</view> | ||
</test> | ||
|
||
<test name="interactive test" help="Some description"> | ||
<styles> | ||
<style name="black" bg_color="0x000000" /> | ||
<style name="white" bg_color="0xFFFFFF" /> | ||
<style name="secondary" bg_color="0x2196F3" /> | ||
<style name="green" bg_color="0x4CAF50" /> | ||
<style name="purple" bg_color="0x800080" width="100"/> | ||
<style name="red" bg_color="0xff0000" width="100"/> | ||
</styles> | ||
<view extends="lv_obj" width="250" height="200" styles="secondary"> | ||
<my_button x="25" y="25" buttontext="Red" buttonstyle="red"/> | ||
<my_button x="25" y="75" buttontext="Purple" buttonstyle="purple"/> | ||
<my_button x="25" y="125" buttontext="Green" buttonstyle="green"/> | ||
</view> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<tests name="Some name" help="Description about the batch of tests below."> | ||
<test name="basic test" help="Some description"> | ||
<consts> | ||
<int name="value" value="30"/> | ||
</consts> | ||
|
||
<view> | ||
<sliderbox value="!value" range="20 80"/> | ||
</view> | ||
</test> | ||
|
||
<test name="test subjects" help="Some description"> | ||
<subjects> | ||
<subject name="value" value="30"/> | ||
</subjects> | ||
<view> | ||
<sliderbox bind_value="value" range="20 80"/> | ||
</view> | ||
</test> | ||
|
||
<test name="test in list with different sizes" help="Some description"> | ||
<view width="300px" height="600px" style_flex_flow="column"> | ||
<sliderbox value="30" range="20 80"/> | ||
<sliderbox value="40" range="20 80" width="100%"/> | ||
<sliderbox value="50" range="20 80" width="200px"/> | ||
<sliderbox value="60" range="20 80" width="100px"/> | ||
</view> | ||
</test> | ||
|
||
<test name="interactive test" help="Some description"> | ||
<view> | ||
<lv_sliderbox value="30" range="20 80"/> | ||
</view> | ||
<steps> | ||
<click pos="20 30"/> | ||
<wait time="100"/> | ||
<screenshot ref="ref_img1"/> | ||
</steps> | ||
</test> | ||
</tests> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* @file dark_slider.c | ||
* | ||
*/ | ||
|
||
/********************* | ||
* INCLUDES | ||
*********************/ | ||
#include "dark_slider_private_gen.h" | ||
|
||
/********************* | ||
* DEFINES | ||
*********************/ | ||
|
||
/********************** | ||
* TYPEDEFS | ||
**********************/ | ||
|
||
/********************** | ||
* STATIC PROTOTYPES | ||
**********************/ | ||
|
||
/********************** | ||
* STATIC VARIABLES | ||
**********************/ | ||
|
||
/********************** | ||
* MACROS | ||
**********************/ | ||
|
||
/********************** | ||
* GLOBAL FUNCTIONS | ||
**********************/ | ||
|
||
void dark_slider_constructor_hook(lv_obj_t * obj) | ||
{ | ||
|
||
} | ||
|
||
void dark_slider_destructor_hook(lv_obj_t * obj) | ||
{ | ||
|
||
} | ||
|
||
void dark_slider_event_hook(lv_event_t * e) | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
/********************** | ||
* STATIC FUNCTIONS | ||
**********************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* @file dark_slider.h | ||
* | ||
*/ | ||
|
||
#ifndef DARK_SLIDER_H | ||
#define DARK_SLIDER_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/********************* | ||
* INCLUDES | ||
*********************/ | ||
#include "lvgl/lvgl.h" | ||
#include "dark_slider_gen.h" | ||
|
||
/********************* | ||
* DEFINES | ||
*********************/ | ||
|
||
/********************** | ||
* TYPEDEFS | ||
**********************/ | ||
|
||
/********************** | ||
* GLOBAL PROTOTYPES | ||
**********************/ | ||
|
||
|
||
|
||
/********************** | ||
* MACROS | ||
**********************/ | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*DARK_SLIDER_H*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<widget> | ||
<params> | ||
<string name="text"/> | ||
</params> | ||
<styles> | ||
<style name="main" | ||
bg_color="0x333333" bg_opa="255" | ||
border_width="2" border_color="0xaaaaaa" | ||
radius="100" | ||
width="100" | ||
pad_all="3"/> | ||
<style name="light_knob" | ||
bg_color="0xeeeeee" bg_opa="255" | ||
border_width="2" border_color="0xaaaaaa" pad_all="10"/> | ||
<style name="blue_indicator" | ||
bg_color="0x0000ff" bg_opa="255"/> | ||
</styles> | ||
<view extends="lv_slider" | ||
styles="main light_knob:knob blue_indicator:indicator" | ||
align="center"> | ||
</view> | ||
</widget> |
Oops, something went wrong.