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
d20fe1f4
Commit
d20fe1f4
authored
Feb 28, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add special default style_mod function in lv_group for LV_COLOR_DEPTH = 1
parent
05fe9b6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
lv_group.c
lv_core/lv_group.c
+8
-0
lv_color.h
lv_misc/lv_color.h
+5
-1
No files found.
lv_core/lv_group.c
View file @
d20fe1f4
...
...
@@ -297,6 +297,7 @@ lv_group_focus_cb_t lv_group_get_focus_cb(lv_group_t * group)
*/
static
void
style_mod_def
(
lv_style_t
*
style
)
{
#if LV_COLOR_DEPTH != 1
/*Make the style to be a little bit orange*/
style
->
body
.
border
.
opa
=
LV_OPA_COVER
;
style
->
body
.
border
.
color
=
LV_COLOR_ORANGE
;
...
...
@@ -309,6 +310,13 @@ static void style_mod_def(lv_style_t * style)
style
->
body
.
shadow
.
color
=
lv_color_mix
(
style
->
body
.
shadow
.
color
,
LV_COLOR_ORANGE
,
LV_OPA_60
);
style
->
text
.
color
=
lv_color_mix
(
style
->
text
.
color
,
LV_COLOR_ORANGE
,
LV_OPA_70
);
#else
style
->
body
.
border
.
opa
=
LV_OPA_COVER
;
style
->
body
.
border
.
color
=
LV_COLOR_BLACK
;
style
->
body
.
border
.
width
=
3
;
#endif
}
#endif
/*USE_LV_GROUP != 0*/
lv_misc/lv_color.h
View file @
d20fe1f4
...
...
@@ -245,11 +245,15 @@ static inline uint32_t lv_color_to24(lv_color_t color)
static
inline
lv_color_t
lv_color_mix
(
lv_color_t
c1
,
lv_color_t
c2
,
uint8_t
mix
)
{
lv_color_t
ret
;
#if LV_COLOR_DEPTH != 1
ret
.
red
=
(
uint16_t
)((
uint16_t
)
c1
.
red
*
mix
+
(
c2
.
red
*
(
255
-
mix
)))
>>
8
;
ret
.
green
=
(
uint16_t
)((
uint16_t
)
c1
.
green
*
mix
+
(
c2
.
green
*
(
255
-
mix
)))
>>
8
;
ret
.
blue
=
(
uint16_t
)((
uint16_t
)
c1
.
blue
*
mix
+
(
c2
.
blue
*
(
255
-
mix
)))
>>
8
;
#if LV_COLOR_DEPTH == 24
#
if LV_COLOR_DEPTH == 24
ret
.
alpha
=
0xFF
;
# endif
#else
ret
.
full
=
mix
>
LV_OPA_50
?
c1
.
full
:
c2
.
full
;
#endif
return
ret
;
...
...
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