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
14cd444f
Commit
14cd444f
authored
Aug 21, 2017
by
Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_list work without lv_img
parent
7dfb4eb3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
lv_draw.h
lv_draw/lv_draw.h
+11
-0
lv_img.h
lv_objx/lv_img.h
+0
-11
lv_list.c
lv_objx/lv_list.c
+6
-3
lv_list.h
lv_objx/lv_list.h
+0
-4
No files found.
lv_draw/lv_draw.h
View file @
14cd444f
...
...
@@ -25,6 +25,17 @@ extern "C" {
* TYPEDEFS
**********************/
/* Image header it is compatible with
* the result image converter utility*/
typedef
struct
{
uint32_t
w
:
12
;
/*Width of the image map*/
uint32_t
h
:
12
;
/*Height of the image map*/
uint32_t
transp
:
1
;
/*1: The image contains transparent pixels with LV_COLOR_TRANSP color*/
uint32_t
cd
:
3
;
/*Color depth (0: reserved, 1: 8 bit, 2: 16 bit or 3: 24 bit, 4-7: reserved)*/
uint32_t
res
:
4
;
/*Reserved*/
}
lv_img_raw_header_t
;
/**********************
* GLOBAL PROTOTYPES
**********************/
...
...
lv_objx/lv_img.h
View file @
14cd444f
...
...
@@ -57,17 +57,6 @@ typedef struct
uint8_t
transp
:
1
;
/*Transp. bit in the image header (Handled by the library)*/
}
lv_img_ext_t
;
/* Image header it is compatible with
* the result image converter utility*/
typedef
struct
{
uint32_t
w
:
12
;
/*Width of the image map*/
uint32_t
h
:
12
;
/*Height of the image map*/
uint32_t
transp
:
1
;
/*1: The image contains transparent pixels with LV_COLOR_TRANSP color*/
uint32_t
cd
:
3
;
/*Color depth (0: reserved, 1: 8 bit, 2: 16 bit or 3: 24 bit, 4-7: reserved)*/
uint32_t
res
:
4
;
/*Reserved*/
}
lv_img_raw_header_t
;
/**********************
* GLOBAL PROTOTYPES
**********************/
...
...
lv_objx/lv_list.c
View file @
14cd444f
...
...
@@ -233,18 +233,17 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const char * img_fn, const char * txt, l
if
(
hpad_tot
<
ext
->
page
.
sb_width
)
w
-=
ext
->
page
.
sb_width
-
hpad_tot
;
}
lv_obj_set_width
(
liste
,
w
);
#if USE_LV_IMG != 0
if
(
img_fn
!=
NULL
&&
img_fn
[
0
]
!=
'\0'
)
{
lv_obj_t
*
img
=
lv_img_create
(
liste
,
NULL
);
lv_img_set_file
(
img
,
img_fn
);
lv_obj_set_style
(
img
,
ext
->
style_img
);
lv_obj_set_click
(
img
,
false
);
}
#endif
if
(
txt
!=
NULL
)
{
lv_obj_t
*
label
=
lv_label_create
(
liste
,
NULL
);
lv_label_set_text
(
label
,
txt
);
lv_obj_set_style
(
label
,
ext
->
styles_btn
[
LV_BTN_STATE_REL
]);
lv_obj_set_click
(
label
,
false
);
lv_obj_set_width
(
label
,
liste
->
cords
.
x2
-
label
->
cords
.
x1
);
lv_label_set_long_mode
(
label
,
LV_LABEL_LONG_ROLL
);
...
...
@@ -463,6 +462,7 @@ lv_obj_t * lv_list_get_element_label(lv_obj_t * liste)
*/
lv_obj_t
*
lv_list_get_element_img
(
lv_obj_t
*
liste
)
{
#if USE_LV_IMG != 0
lv_obj_t
*
img
=
lv_obj_get_child
(
liste
,
NULL
);
if
(
img
==
NULL
)
return
NULL
;
...
...
@@ -472,6 +472,9 @@ lv_obj_t * lv_list_get_element_img(lv_obj_t * liste)
}
return
img
;
#else
return
NULL
;
#endif
}
/**
...
...
lv_objx/lv_list.h
View file @
14cd444f
...
...
@@ -29,10 +29,6 @@ extern "C" {
#error "lv_list: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) "
#endif
#if USE_LV_IMG == 0
#error "lv_list: lv_img is required. Enable it in lv_conf.h (USE_LV_IMG 1) "
#endif
#include "../lv_obj/lv_obj.h"
#include "lv_page.h"
...
...
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