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
056d449f
Commit
056d449f
authored
Jul 07, 2017
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LV_PROTECT_FOLLOW added to 'line break' to LV_CONT_LAYOUT_PRETTY
parent
889807b4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
lv_app_benchmark.c
lv_appx/lv_app_benchmark.c
+0
-0
lv_conf_templ.h
lv_conf_templ.h
+4
-4
lv_obj.h
lv_obj/lv_obj.h
+2
-1
lv_cont.c
lv_objx/lv_cont.c
+7
-3
No files found.
lv_appx/lv_app_benchmark.c
View file @
056d449f
This diff is collapsed.
Click to expand it.
lv_conf_templ.h
View file @
056d449f
...
...
@@ -242,8 +242,8 @@
#define LV_APP_FILES_CHUNK_MAX_SIZE 1024 /*Max chunk size when the user sets it*/
#endif /*USE_LV_APP_FILES != 0*/
/*WiFi*/
#define USE_LV_APP_WIFI
1
/*WiFi
(requires hal/wifi)
*/
#define USE_LV_APP_WIFI
0
#if USE_LV_APP_WIFI != 0
#define LV_APP_WIFI_SSID_DEF "my_ssid"
#define LV_APP_WIFI_PWD_DEF "my_pasword"
...
...
@@ -252,8 +252,8 @@
#define LV_APP_WIFI_AUTO_CONNECT 1 /*Try to connect at start up to the deafult SSID and IP:PORT*/
#endif /*USE_LV_APP_WIFI != 0*/
/*GSM*/
#define USE_LV_APP_GSM
1
/*GSM
(requires hal/gsm)
*/
#define USE_LV_APP_GSM
0
#if USE_LV_APP_GSM != 0
#define LV_APP_GSM_APN_DEF "my_apn"
#define LV_APP_GSM_IP_DEF "10.11.12.13"
...
...
lv_obj/lv_obj.h
View file @
056d449f
...
...
@@ -126,7 +126,8 @@ typedef enum
LV_PROTECT_NONE
=
0x00
,
LV_PROTECT_CHILD_CHG
=
0x01
,
/*Disable the child change signal. Used by the library*/
LV_PROTECT_PARENT
=
0x02
,
/*Prevent automatic parent change (e.g. in lv_page)*/
LV_PROTECT_POS
=
0x04
,
/*Prevent automatic positioning (e.g. in lv_rect layout)*/
LV_PROTECT_POS
=
0x04
,
/*Prevent automatic positioning (e.g. in lv_cont layout)*/
LV_PROTECT_FOLLOW
=
0x08
,
/*Prevent an object follow in automatic ordering (e.g. in lv_cont PRETTY layout)*/
}
lv_protect_t
;
typedef
enum
...
...
lv_objx/lv_cont.c
View file @
056d449f
...
...
@@ -438,17 +438,21 @@ static void lv_cont_layout_pretty(lv_obj_t * cont)
do
{
if
(
lv_obj_get_hidden
(
child_rc
)
==
false
&&
lv_obj_is_protected
(
child_rc
,
LV_PROTECT_POS
)
==
false
)
{
if
(
w_row
+
lv_obj_get_width
(
child_rc
)
>
w_obj
)
break
;
/*If the next
object is already not fit then break*/
if
(
w_row
+
lv_obj_get_width
(
child_rc
)
>
w_obj
)
break
;
/*If this
object is already not fit then break*/
w_row
+=
lv_obj_get_width
(
child_rc
)
+
style
->
opad
;
/*Add the object width + opad*/
h_row
=
MATH_MAX
(
h_row
,
lv_obj_get_height
(
child_rc
));
/*Search the highest object*/
obj_num
++
;
if
(
lv_obj_is_protected
(
child_rc
,
LV_PROTECT_FOLLOW
))
break
;
/*If can not be followed by an other object then break here*/
}
child_rc
=
ll_get_prev
(
&
cont
->
child_ll
,
child_rc
);
/*Load the next object*/
if
(
obj_num
==
0
)
child_rs
=
child_rc
;
/*If the first object was hidden (or too long) then set the next as first */
}
while
(
child_rc
!=
NULL
);
/*Step back one child because the last already not fit*/
if
(
child_rc
!=
NULL
&&
obj_num
!=
0
)
child_rc
=
ll_get_next
(
&
cont
->
child_ll
,
child_rc
);
/*Step back one child because the last already not fit (except follow protected)*/
if
(
child_rc
!=
NULL
&&
obj_num
!=
0
&&
!
lv_obj_is_protected
(
child_rc
,
LV_PROTECT_FOLLOW
))
{
child_rc
=
ll_get_next
(
&
cont
->
child_ll
,
child_rc
);
}
/*If the object is too long then align it to the middle*/
if
(
obj_num
==
0
)
{
...
...
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