BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
8fd12c53
Commit
8fd12c53
authored
Nov 20, 2017
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style renames
parent
68133801
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
119 additions
and
119 deletions
+119
-119
lv_draw.c
lv_draw/lv_draw.c
+2
-2
lv_group.c
lv_obj/lv_group.c
+1
-1
lv_style.c
lv_obj/lv_style.c
+49
-49
lv_style.h
lv_obj/lv_style.h
+6
-6
lv_btn.c
lv_objx/lv_btn.c
+5
-5
lv_btnm.c
lv_objx/lv_btnm.c
+5
-5
lv_chart.c
lv_objx/lv_chart.c
+2
-2
lv_gauge.c
lv_objx/lv_gauge.c
+1
-1
lv_led.c
lv_objx/lv_led.c
+1
-1
lv_list.c
lv_objx/lv_list.c
+5
-5
lv_lmeter.c
lv_objx/lv_lmeter.c
+1
-1
lv_roller.c
lv_objx/lv_roller.c
+3
-3
lv_ta.c
lv_objx/lv_ta.c
+1
-1
lv_win.c
lv_objx/lv_win.c
+2
-2
lv_theme_alien.c
lv_themes/lv_theme_alien.c
+27
-27
lv_theme_default.c
lv_themes/lv_theme_default.c
+8
-8
No files found.
lv_draw/lv_draw.c
View file @
8fd12c53
...
...
@@ -593,7 +593,7 @@ static void lv_draw_rect_main_mid(const area_t * coords, const area_t * mask, co
uint16_t
radius
=
style
->
body
.
radius
;
color_t
mcolor
=
style
->
body
.
main_color
;
color_t
gcolor
=
style
->
body
.
grad
ient
_color
;
color_t
gcolor
=
style
->
body
.
grad_color
;
uint8_t
mix
;
opa_t
opa
=
style
->
body
.
opa
;
cord_t
height
=
area_get_height
(
coords
);
...
...
@@ -643,7 +643,7 @@ static void lv_draw_rect_main_corner(const area_t * coords, const area_t * mask,
uint16_t
radius
=
style
->
body
.
radius
;
color_t
mcolor
=
style
->
body
.
main_color
;
color_t
gcolor
=
style
->
body
.
grad
ient
_color
;
color_t
gcolor
=
style
->
body
.
grad_color
;
color_t
act_color
;
opa_t
opa
=
style
->
body
.
opa
;
uint8_t
mix
;
...
...
lv_obj/lv_group.c
View file @
8fd12c53
...
...
@@ -259,7 +259,7 @@ static void style_mod_def(lv_style_t * style)
if
(
style
->
body
.
empty
==
0
||
style
->
body
.
border
.
width
!=
0
)
style
->
body
.
border
.
width
=
LV_DPI
/
20
;
style
->
body
.
main_color
=
color_mix
(
style
->
body
.
main_color
,
COLOR_ORANGE
,
OPA_70
);
style
->
body
.
grad
ient_color
=
color_mix
(
style
->
body
.
gradient
_color
,
COLOR_ORANGE
,
OPA_70
);
style
->
body
.
grad
_color
=
color_mix
(
style
->
body
.
grad
_color
,
COLOR_ORANGE
,
OPA_70
);
style
->
body
.
shadow
.
color
=
color_mix
(
style
->
body
.
shadow
.
color
,
COLOR_ORANGE
,
OPA_60
);
style
->
text
.
color
=
color_mix
(
style
->
text
.
color
,
COLOR_ORANGE
,
OPA_70
);
...
...
lv_obj/lv_style.c
View file @
8fd12c53
...
...
@@ -45,11 +45,11 @@ lv_style_t lv_style_plain;
lv_style_t
lv_style_plain_color
;
lv_style_t
lv_style_pretty
;
lv_style_t
lv_style_pretty_color
;
lv_style_t
lv_style_btn_rel
eased
;
lv_style_t
lv_style_btn_pr
essed
;
lv_style_t
lv_style_btn_tgl_rel
eased
;
lv_style_t
lv_style_btn_tgl_pr
essed
;
lv_style_t
lv_style_btn_ina
ctive
;
lv_style_t
lv_style_btn_rel
;
lv_style_t
lv_style_btn_pr
;
lv_style_t
lv_style_btn_tgl_rel
;
lv_style_t
lv_style_btn_tgl_pr
;
lv_style_t
lv_style_btn_ina
;
/**********************
* MACROS
...
...
@@ -71,7 +71,7 @@ void lv_style_init (void)
lv_style_scr
.
glass
=
0
;
lv_style_scr
.
body
.
opa
=
OPA_COVER
;
lv_style_scr
.
body
.
main_color
=
COLOR_WHITE
;
lv_style_scr
.
body
.
grad
ient
_color
=
COLOR_WHITE
;
lv_style_scr
.
body
.
grad_color
=
COLOR_WHITE
;
lv_style_scr
.
body
.
radius
=
0
;
lv_style_scr
.
body
.
padding
.
ver
=
LV_DPI
/
12
;
lv_style_scr
.
body
.
padding
.
hor
=
LV_DPI
/
12
;
...
...
@@ -109,7 +109,7 @@ void lv_style_init (void)
lv_style_plain_color
.
image
.
color
=
COLOR_MAKE
(
0xf0
,
0xf0
,
0xf0
);
lv_style_plain_color
.
line
.
color
=
COLOR_MAKE
(
0xf0
,
0xf0
,
0xf0
);
lv_style_plain_color
.
body
.
main_color
=
COLOR_MAKE
(
0x55
,
0x96
,
0xd8
);
lv_style_plain_color
.
body
.
grad
ient
_color
=
lv_style_plain_color
.
body
.
main_color
;
lv_style_plain_color
.
body
.
grad_color
=
lv_style_plain_color
.
body
.
main_color
;
/*Pretty style */
memcpy
(
&
lv_style_pretty
,
&
lv_style_plain
,
sizeof
(
lv_style_t
));
...
...
@@ -117,7 +117,7 @@ void lv_style_init (void)
lv_style_pretty
.
image
.
color
=
COLOR_MAKE
(
0x20
,
0x20
,
0x20
);
lv_style_pretty
.
line
.
color
=
COLOR_MAKE
(
0x20
,
0x20
,
0x20
);
lv_style_pretty
.
body
.
main_color
=
COLOR_WHITE
;
lv_style_pretty
.
body
.
grad
ient
_color
=
COLOR_SILVER
;
lv_style_pretty
.
body
.
grad_color
=
COLOR_SILVER
;
lv_style_pretty
.
body
.
radius
=
LV_DPI
/
15
;
lv_style_pretty
.
body
.
border
.
color
=
COLOR_MAKE
(
0x40
,
0x40
,
0x40
);
lv_style_pretty
.
body
.
border
.
width
=
LV_DPI
/
50
>=
1
?
LV_DPI
/
50
:
1
;
...
...
@@ -129,7 +129,7 @@ void lv_style_init (void)
lv_style_pretty_color
.
image
.
color
=
COLOR_MAKE
(
0xe0
,
0xe0
,
0xe0
);
lv_style_pretty_color
.
line
.
color
=
COLOR_MAKE
(
0xc0
,
0xc0
,
0xc0
);
lv_style_pretty_color
.
body
.
main_color
=
COLOR_MAKE
(
0x6b
,
0x9a
,
0xc7
);
lv_style_pretty_color
.
body
.
grad
ient
_color
=
COLOR_MAKE
(
0x2b
,
0x59
,
0x8b
);
lv_style_pretty_color
.
body
.
grad_color
=
COLOR_MAKE
(
0x2b
,
0x59
,
0x8b
);
lv_style_pretty_color
.
body
.
border
.
color
=
COLOR_MAKE
(
0x15
,
0x2c
,
0x42
);
/*Transparent style*/
...
...
@@ -148,53 +148,53 @@ void lv_style_init (void)
lv_style_transp_tight
.
body
.
padding
.
inner
=
0
;
/*Button released style*/
memcpy
(
&
lv_style_btn_rel
eased
,
&
lv_style_plain
,
sizeof
(
lv_style_t
));
lv_style_btn_rel
eased
.
body
.
main_color
=
COLOR_MAKE
(
0x76
,
0xa2
,
0xd0
);
lv_style_btn_rel
eased
.
body
.
gradient
_color
=
COLOR_MAKE
(
0x19
,
0x3a
,
0x5d
);
lv_style_btn_rel
eased
.
body
.
radius
=
LV_DPI
/
15
;
lv_style_btn_rel
eased
.
body
.
padding
.
hor
=
LV_DPI
/
4
;
lv_style_btn_rel
eased
.
body
.
padding
.
ver
=
LV_DPI
/
6
;
lv_style_btn_rel
eased
.
body
.
padding
.
inner
=
LV_DPI
/
10
;
lv_style_btn_rel
eased
.
body
.
border
.
color
=
COLOR_MAKE
(
0x0b
,
0x19
,
0x28
);
lv_style_btn_rel
eased
.
body
.
border
.
width
=
LV_DPI
/
50
>=
1
?
LV_DPI
/
50
:
1
;
lv_style_btn_rel
eased
.
body
.
border
.
opa
=
OPA_70
;
lv_style_btn_rel
eased
.
text
.
color
=
COLOR_MAKE
(
0xff
,
0xff
,
0xff
);
lv_style_btn_rel
eased
.
body
.
shadow
.
color
=
COLOR_GRAY
;
lv_style_btn_rel
eased
.
body
.
shadow
.
width
=
0
;
memcpy
(
&
lv_style_btn_rel
,
&
lv_style_plain
,
sizeof
(
lv_style_t
));
lv_style_btn_rel
.
body
.
main_color
=
COLOR_MAKE
(
0x76
,
0xa2
,
0xd0
);
lv_style_btn_rel
.
body
.
grad
_color
=
COLOR_MAKE
(
0x19
,
0x3a
,
0x5d
);
lv_style_btn_rel
.
body
.
radius
=
LV_DPI
/
15
;
lv_style_btn_rel
.
body
.
padding
.
hor
=
LV_DPI
/
4
;
lv_style_btn_rel
.
body
.
padding
.
ver
=
LV_DPI
/
6
;
lv_style_btn_rel
.
body
.
padding
.
inner
=
LV_DPI
/
10
;
lv_style_btn_rel
.
body
.
border
.
color
=
COLOR_MAKE
(
0x0b
,
0x19
,
0x28
);
lv_style_btn_rel
.
body
.
border
.
width
=
LV_DPI
/
50
>=
1
?
LV_DPI
/
50
:
1
;
lv_style_btn_rel
.
body
.
border
.
opa
=
OPA_70
;
lv_style_btn_rel
.
text
.
color
=
COLOR_MAKE
(
0xff
,
0xff
,
0xff
);
lv_style_btn_rel
.
body
.
shadow
.
color
=
COLOR_GRAY
;
lv_style_btn_rel
.
body
.
shadow
.
width
=
0
;
/*Button pressed style*/
memcpy
(
&
lv_style_btn_pr
essed
,
&
lv_style_btn_released
,
sizeof
(
lv_style_t
));
lv_style_btn_pr
essed
.
body
.
main_color
=
COLOR_MAKE
(
0x33
,
0x62
,
0x94
);
lv_style_btn_pr
essed
.
body
.
gradient
_color
=
COLOR_MAKE
(
0x10
,
0x26
,
0x3c
);
lv_style_btn_pr
essed
.
text
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_pr
essed
.
image
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_pr
essed
.
line
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
memcpy
(
&
lv_style_btn_pr
,
&
lv_style_btn_rel
,
sizeof
(
lv_style_t
));
lv_style_btn_pr
.
body
.
main_color
=
COLOR_MAKE
(
0x33
,
0x62
,
0x94
);
lv_style_btn_pr
.
body
.
grad
_color
=
COLOR_MAKE
(
0x10
,
0x26
,
0x3c
);
lv_style_btn_pr
.
text
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_pr
.
image
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_pr
.
line
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
/*Button toggle released style*/
memcpy
(
&
lv_style_btn_tgl_rel
eased
,
&
lv_style_btn_released
,
sizeof
(
lv_style_t
));
lv_style_btn_tgl_rel
eased
.
body
.
main_color
=
COLOR_MAKE
(
0x0a
,
0x11
,
0x22
);
lv_style_btn_tgl_rel
eased
.
body
.
gradient
_color
=
COLOR_MAKE
(
0x37
,
0x62
,
0x90
);
lv_style_btn_tgl_rel
eased
.
body
.
border
.
color
=
COLOR_MAKE
(
0x01
,
0x07
,
0x0d
);
lv_style_btn_tgl_rel
eased
.
text
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
lv_style_btn_tgl_rel
eased
.
image
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
lv_style_btn_tgl_rel
eased
.
line
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
memcpy
(
&
lv_style_btn_tgl_rel
,
&
lv_style_btn_rel
,
sizeof
(
lv_style_t
));
lv_style_btn_tgl_rel
.
body
.
main_color
=
COLOR_MAKE
(
0x0a
,
0x11
,
0x22
);
lv_style_btn_tgl_rel
.
body
.
grad
_color
=
COLOR_MAKE
(
0x37
,
0x62
,
0x90
);
lv_style_btn_tgl_rel
.
body
.
border
.
color
=
COLOR_MAKE
(
0x01
,
0x07
,
0x0d
);
lv_style_btn_tgl_rel
.
text
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
lv_style_btn_tgl_rel
.
image
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
lv_style_btn_tgl_rel
.
line
.
color
=
COLOR_MAKE
(
0xc8
,
0xdd
,
0xf4
);
/*Button toggle pressed style*/
memcpy
(
&
lv_style_btn_tgl_pr
essed
,
&
lv_style_btn_tgl_released
,
sizeof
(
lv_style_t
));
lv_style_btn_tgl_pr
essed
.
body
.
main_color
=
COLOR_MAKE
(
0x02
,
0x14
,
0x27
);
lv_style_btn_tgl_pr
essed
.
body
.
gradient
_color
=
COLOR_MAKE
(
0x2b
,
0x4c
,
0x70
);
lv_style_btn_tgl_pr
essed
.
text
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_tgl_pr
essed
.
image
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_tgl_pr
essed
.
line
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
memcpy
(
&
lv_style_btn_tgl_pr
,
&
lv_style_btn_tgl_rel
,
sizeof
(
lv_style_t
));
lv_style_btn_tgl_pr
.
body
.
main_color
=
COLOR_MAKE
(
0x02
,
0x14
,
0x27
);
lv_style_btn_tgl_pr
.
body
.
grad
_color
=
COLOR_MAKE
(
0x2b
,
0x4c
,
0x70
);
lv_style_btn_tgl_pr
.
text
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_tgl_pr
.
image
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
lv_style_btn_tgl_pr
.
line
.
color
=
COLOR_MAKE
(
0xa4
,
0xb5
,
0xc6
);
/*Button inactive style*/
memcpy
(
&
lv_style_btn_ina
ctive
,
&
lv_style_btn_released
,
sizeof
(
lv_style_t
));
lv_style_btn_ina
ctive
.
body
.
main_color
=
COLOR_MAKE
(
0xd8
,
0xd8
,
0xd8
);
lv_style_btn_ina
ctive
.
body
.
gradient
_color
=
COLOR_MAKE
(
0xd8
,
0xd8
,
0xd8
);
lv_style_btn_ina
ctive
.
body
.
border
.
color
=
COLOR_MAKE
(
0x90
,
0x90
,
0x90
);
lv_style_btn_ina
ctive
.
text
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
lv_style_btn_ina
ctive
.
image
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
lv_style_btn_ina
ctive
.
line
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
memcpy
(
&
lv_style_btn_ina
,
&
lv_style_btn_rel
,
sizeof
(
lv_style_t
));
lv_style_btn_ina
.
body
.
main_color
=
COLOR_MAKE
(
0xd8
,
0xd8
,
0xd8
);
lv_style_btn_ina
.
body
.
grad
_color
=
COLOR_MAKE
(
0xd8
,
0xd8
,
0xd8
);
lv_style_btn_ina
.
body
.
border
.
color
=
COLOR_MAKE
(
0x90
,
0x90
,
0x90
);
lv_style_btn_ina
.
text
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
lv_style_btn_ina
.
image
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
lv_style_btn_ina
.
line
.
color
=
COLOR_MAKE
(
0x70
,
0x70
,
0x70
);
}
...
...
@@ -267,7 +267,7 @@ static void lv_style_aimator(lv_style_anim_dsc_t * dsc, int32_t val)
STYLE_ATTR_ANIM
(
image
.
intense
,
val
);
act
->
body
.
main_color
=
color_mix
(
end
->
body
.
main_color
,
start
->
body
.
main_color
,
val
);
act
->
body
.
grad
ient_color
=
color_mix
(
end
->
body
.
gradient_color
,
start
->
body
.
gradient
_color
,
val
);
act
->
body
.
grad
_color
=
color_mix
(
end
->
body
.
grad_color
,
start
->
body
.
grad
_color
,
val
);
act
->
body
.
border
.
color
=
color_mix
(
end
->
body
.
border
.
color
,
start
->
body
.
border
.
color
,
val
);
act
->
body
.
shadow
.
color
=
color_mix
(
end
->
body
.
shadow
.
color
,
start
->
body
.
shadow
.
color
,
val
);
act
->
text
.
color
=
color_mix
(
end
->
text
.
color
,
start
->
text
.
color
,
val
);
...
...
lv_obj/lv_style.h
View file @
8fd12c53
...
...
@@ -53,7 +53,7 @@ typedef struct
struct
{
color_t
main_color
;
color_t
grad
ient
_color
;
color_t
grad_color
;
cord_t
radius
;
opa_t
opa
;
...
...
@@ -162,11 +162,11 @@ extern lv_style_t lv_style_plain;
extern
lv_style_t
lv_style_plain_color
;
extern
lv_style_t
lv_style_pretty
;
extern
lv_style_t
lv_style_pretty_color
;
extern
lv_style_t
lv_style_btn_rel
eased
;
extern
lv_style_t
lv_style_btn_pr
essed
;
extern
lv_style_t
lv_style_btn_tgl_rel
eased
;
extern
lv_style_t
lv_style_btn_tgl_pr
essed
;;
extern
lv_style_t
lv_style_btn_ina
ctive
;
extern
lv_style_t
lv_style_btn_rel
;
extern
lv_style_t
lv_style_btn_pr
;
extern
lv_style_t
lv_style_btn_tgl_rel
;
extern
lv_style_t
lv_style_btn_tgl_pr
;;
extern
lv_style_t
lv_style_btn_ina
;
/**********************
* MACROS
...
...
lv_objx/lv_btn.c
View file @
8fd12c53
...
...
@@ -68,11 +68,11 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy)
ext
->
actions
[
LV_BTN_ACTION_LONG_PR
]
=
NULL
;
ext
->
actions
[
LV_BTN_ACTION_LONG_PR_REPEAT
]
=
NULL
;
ext
->
styles
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
eased
;
ext
->
styles
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
essed
;
ext
->
styles
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
eased
;
ext
->
styles
[
LV_BTN_STATE_TGL_PR
]
=
&
lv_style_btn_tgl_pr
essed
;
ext
->
styles
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
ctive
;
ext
->
styles
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
;
ext
->
styles
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
;
ext
->
styles
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
;
ext
->
styles
[
LV_BTN_STATE_TGL_PR
]
=
&
lv_style_btn_tgl_pr
;
ext
->
styles
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
;
ext
->
long_pr_action_executed
=
0
;
ext
->
toggle
=
0
;
...
...
lv_objx/lv_btnm.c
View file @
8fd12c53
...
...
@@ -79,11 +79,11 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy)
ext
->
action
=
NULL
;
ext
->
map_p
=
NULL
;
ext
->
toggle
=
0
;
ext
->
styles_btn
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
eased
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
essed
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
eased
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_PR
]
=
&
lv_style_btn_tgl_pr
essed
;
ext
->
styles_btn
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
ctive
;
ext
->
styles_btn
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_PR
]
=
&
lv_style_btn_tgl_pr
;
ext
->
styles_btn
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
;
if
(
ancestor_design_f
==
NULL
)
ancestor_design_f
=
lv_obj_get_design_func
(
new_btnm
);
...
...
lv_objx/lv_chart.c
View file @
8fd12c53
...
...
@@ -554,7 +554,7 @@ static void lv_chart_draw_points(lv_obj_t * chart, const area_t * mask)
/*Go through all data lines*/
LL_READ_BACK
(
ext
->
series_ll
,
ser
)
{
style_point
.
body
.
main_color
=
ser
->
color
;
style_point
.
body
.
grad
ient
_color
=
color_mix
(
COLOR_BLACK
,
ser
->
color
,
ext
->
series
.
dark
);
style_point
.
body
.
grad_color
=
color_mix
(
COLOR_BLACK
,
ser
->
color
,
ext
->
series
.
dark
);
for
(
i
=
0
;
i
<
ext
->
point_cnt
;
i
++
)
{
cir_a
.
x1
=
((
w
*
i
)
/
(
ext
->
point_cnt
-
1
))
+
x_ofs
;
...
...
@@ -612,7 +612,7 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const area_t * mask)
/*Draw the current point of all data line*/
LL_READ_BACK
(
ext
->
series_ll
,
ser
)
{
rects
.
body
.
main_color
=
ser
->
color
;
rects
.
body
.
grad
ient
_color
=
color_mix
(
COLOR_BLACK
,
ser
->
color
,
ext
->
series
.
dark
);
rects
.
body
.
grad_color
=
color_mix
(
COLOR_BLACK
,
ser
->
color
,
ext
->
series
.
dark
);
col_a
.
x1
=
x_act
;
col_a
.
x2
=
col_a
.
x1
+
col_w
;
x_act
+=
col_w
;
...
...
lv_objx/lv_gauge.c
View file @
8fd12c53
...
...
@@ -406,7 +406,7 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const area_t * mask)
lv_style_t
style_neddle_mid
;
lv_style_copy
(
&
style_neddle_mid
,
&
lv_style_plain
);
style_neddle_mid
.
body
.
main_color
=
style
->
body
.
border
.
color
;
style_neddle_mid
.
body
.
grad
ient
_color
=
style
->
body
.
border
.
color
;
style_neddle_mid
.
body
.
grad_color
=
style
->
body
.
border
.
color
;
style_neddle_mid
.
body
.
radius
=
LV_RADIUS_CIRCLE
;
area_t
nm_cord
;
...
...
lv_objx/lv_led.c
View file @
8fd12c53
...
...
@@ -190,7 +190,7 @@ static bool lv_led_design(lv_obj_t * led, const area_t * mask, lv_design_mode_t
/*Mix. the color with black proportionally with brightness*/
leds_tmp
.
body
.
main_color
=
color_mix
(
leds_tmp
.
body
.
main_color
,
COLOR_BLACK
,
ext
->
bright
);
leds_tmp
.
body
.
grad
ient_color
=
color_mix
(
leds_tmp
.
body
.
gradient
_color
,
COLOR_BLACK
,
ext
->
bright
);
leds_tmp
.
body
.
grad
_color
=
color_mix
(
leds_tmp
.
body
.
grad
_color
,
COLOR_BLACK
,
ext
->
bright
);
leds_tmp
.
body
.
border
.
color
=
color_mix
(
leds_tmp
.
body
.
border
.
color
,
COLOR_BLACK
,
ext
->
bright
);
/*Set the current swidth according to brightness proportionally between LV_LED_BRIGHT_OFF and LV_LED_BRIGHT_ON*/
...
...
lv_objx/lv_list.c
View file @
8fd12c53
...
...
@@ -67,11 +67,11 @@ lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy)
dm_assert
(
ext
);
ext
->
style_img
=
NULL
;
ext
->
styles_btn
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
eased
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
essed
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
eased
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_tgl_pr
essed
;
ext
->
styles_btn
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
ctive
;
ext
->
styles_btn
[
LV_BTN_STATE_REL
]
=
&
lv_style_btn_rel
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_pr
;
ext
->
styles_btn
[
LV_BTN_STATE_TGL_REL
]
=
&
lv_style_btn_tgl_rel
;
ext
->
styles_btn
[
LV_BTN_STATE_PR
]
=
&
lv_style_btn_tgl_pr
;
ext
->
styles_btn
[
LV_BTN_STATE_INA
]
=
&
lv_style_btn_ina
;
ext
->
anim_time
=
LV_LIST_FOCUS_TIME
;
lv_obj_set_signal_func
(
new_list
,
lv_list_signal
);
...
...
lv_objx/lv_lmeter.c
View file @
8fd12c53
...
...
@@ -279,7 +279,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const area_t * mask, lv_design_m
if
(
i
>
level
)
style_tmp
.
line
.
color
=
style
->
line
.
color
;
else
{
style_tmp
.
line
.
color
=
color_mix
(
style
->
body
.
grad
ient
_color
,
style
->
body
.
main_color
,
(
255
*
i
)
/
ext
->
line_cnt
);
style_tmp
.
line
.
color
=
color_mix
(
style
->
body
.
grad_color
,
style
->
body
.
main_color
,
(
255
*
i
)
/
ext
->
line_cnt
);
}
lv_draw_line
(
&
p1
,
&
p2
,
mask
,
&
style_tmp
);
...
...
lv_objx/lv_roller.c
View file @
8fd12c53
...
...
@@ -394,13 +394,13 @@ static void draw_bg(lv_obj_t *roller, const area_t *mask)
if
(
union_ok
){
color_t
main_tmp
=
style
->
body
.
main_color
;
color_t
grad_tmp
=
style
->
body
.
grad
ient
_color
;
color_t
grad_tmp
=
style
->
body
.
grad_color
;
style
->
body
.
main_color
=
grad_tmp
;
style
->
body
.
grad
ient
_color
=
main_tmp
;
style
->
body
.
grad_color
=
main_tmp
;
lv_draw_rect
(
&
half_roller
,
&
half_mask
,
style
);
style
->
body
.
main_color
=
main_tmp
;
style
->
body
.
grad
ient
_color
=
grad_tmp
;
style
->
body
.
grad_color
=
grad_tmp
;
}
}
...
...
lv_objx/lv_ta.c
View file @
8fd12c53
...
...
@@ -757,7 +757,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const area_t * mask, lv_des
color_t
ccolor_tmp
=
cur_style
.
text
.
color
;
/*Make letter color to cursor color*/
cur_style
.
text
.
color
=
cur_style
.
body
.
main_color
;
/*In block mode the letter color will be current background color*/
cur_style
.
body
.
main_color
=
ccolor_tmp
;
cur_style
.
body
.
grad
ient
_color
=
ccolor_tmp
;
cur_style
.
body
.
grad_color
=
ccolor_tmp
;
cur_style
.
body
.
border
.
color
=
ccolor_tmp
;
cur_style
.
body
.
border
.
opa
=
OPA_COVER
;
cur_style
.
body
.
border
.
width
=
1
<<
LV_ANTIALIAS
;
...
...
lv_objx/lv_win.c
View file @
8fd12c53
...
...
@@ -59,8 +59,8 @@ lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
ext
->
header
=
NULL
;
ext
->
title
=
NULL
;
ext
->
style_header
=
&
lv_style_plain_color
;
ext
->
style_btn_rel
=
&
lv_style_btn_rel
eased
;
ext
->
style_btn_pr
=
&
lv_style_btn_pr
essed
;
ext
->
style_btn_rel
=
&
lv_style_btn_rel
;
ext
->
style_btn_pr
=
&
lv_style_btn_pr
;
ext
->
btn_size
=
(
LV_DPI
)
/
2
;
/*Init the new window object*/
...
...
lv_themes/lv_theme_alien.c
View file @
8fd12c53
This diff is collapsed.
Click to expand it.
lv_themes/lv_theme_default.c
View file @
8fd12c53
...
...
@@ -58,7 +58,7 @@ static void basic_init(void)
lv_style_copy
(
&
def
,
&
lv_style_pretty
);
/*Initialize the default style*/
lv_style_copy
(
&
sb
,
&
lv_style_pretty_color
);
sb
.
body
.
grad
ient
_color
=
sb
.
body
.
main_color
;
sb
.
body
.
grad_color
=
sb
.
body
.
main_color
;
sb
.
body
.
padding
.
hor
=
sb
.
body
.
padding
.
hor
/
2
;
/*Make closer to the edges*/
sb
.
body
.
padding
.
ver
=
sb
.
body
.
padding
.
ver
/
2
;
...
...
@@ -76,7 +76,7 @@ static void btn_init(void)
#if USE_LV_BTN != 0
theme
.
btn
.
rel
=
&
lv_style_btn_released
;
theme
.
btn
.
pr
=
&
lv_style_btn_pressed
;
theme
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
btn
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
theme
.
btn
.
ina
=
&
lv_style_btn_inactive
;
#endif
...
...
@@ -182,7 +182,7 @@ static void lmeter_init(void)
lmeter
.
line
.
color
=
COLOR_HEX3
(
0xddd
);
lmeter
.
line
.
width
=
2
<<
LV_ANTIALIAS
;
lmeter
.
body
.
main_color
=
color_mix
(
lmeter
.
body
.
main_color
,
COLOR_WHITE
,
OPA_50
);
lmeter
.
body
.
grad
ient_color
=
color_mix
(
lmeter
.
body
.
gradient
_color
,
COLOR_BLACK
,
OPA_50
);
lmeter
.
body
.
grad
_color
=
color_mix
(
lmeter
.
body
.
grad
_color
,
COLOR_BLACK
,
OPA_50
);
theme
.
lmeter
=
&
lmeter
;
#endif
...
...
@@ -214,7 +214,7 @@ static void cb_init(void)
theme
.
cb
.
bg
=
&
lv_style_transp
;
theme
.
cb
.
box
.
rel
=
&
lv_style_pretty
;
theme
.
cb
.
box
.
pr
=
&
lv_style_btn_pressed
;
theme
.
cb
.
box
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
cb
.
box
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
cb
.
box
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
theme
.
cb
.
box
.
ina
=
&
lv_style_btn_inactive
;
#endif
...
...
@@ -229,7 +229,7 @@ static void btnm_init(void)
theme
.
btnm
.
bg
=
&
lv_style_pretty
;
theme
.
btnm
.
btn
.
rel
=
&
lv_style_btn_released
;
theme
.
btnm
.
btn
.
pr
=
&
lv_style_btn_pressed
;
theme
.
btnm
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
btnm
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
btnm
.
btn
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
theme
.
btnm
.
btn
.
ina
=
&
lv_style_btn_inactive
;
#endif
...
...
@@ -243,7 +243,7 @@ static void kb_init(void)
theme
.
kb
.
bg
=
&
lv_style_pretty
;
theme
.
kb
.
btn
.
rel
=
&
lv_style_btn_released
;
theme
.
kb
.
btn
.
pr
=
&
lv_style_btn_pressed
;
theme
.
kb
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
kb
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
kb
.
btn
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
theme
.
kb
.
btn
.
ina
=
&
lv_style_btn_inactive
;
#endif
...
...
@@ -294,7 +294,7 @@ static void list_init(void)
theme
.
list
.
sb
=
&
sb
;
theme
.
list
.
btn
.
rel
=
&
lv_style_btn_released
;
theme
.
list
.
btn
.
pr
=
&
lv_style_btn_pressed
;
theme
.
list
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
list
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
list
.
btn
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
theme
.
list
.
btn
.
ina
=
&
lv_style_btn_inactive
;
#endif
...
...
@@ -332,7 +332,7 @@ static void tabview_init(void)
theme
.
tabview
.
btn
.
bg
=
&
lv_style_transp
;
theme
.
tabview
.
btn
.
rel
=
&
lv_style_btn_released
;
theme
.
tabview
.
btn
.
pr
=
&
lv_style_btn_pressed
;
theme
.
tabview
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
eased
;
theme
.
tabview
.
btn
.
tgl_rel
=
&
lv_style_btn_tgl_rel
;
theme
.
tabview
.
btn
.
tgl_pr
=
&
lv_style_btn_tgl_pressed
;
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment