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
6f1d63bf
Commit
6f1d63bf
authored
Jul 07, 2017
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LV_CONT_LAYOUT_PRETTY with LV_PROTECT_FOLLOW bugfix
parent
ca3f4e1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
lv_cont.c
lv_objx/lv_cont.c
+8
-6
lv_win.c
lv_objx/lv_win.c
+0
-4
No files found.
lv_objx/lv_cont.c
View file @
6f1d63bf
...
...
@@ -438,7 +438,14 @@ 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 this object is already not fit then break*/
/*If this object is already not fit then break*/
if
(
w_row
+
lv_obj_get_width
(
child_rc
)
>
w_obj
)
{
/*Step back one child because the last already not fit, so the previous is the closer*/
if
(
child_rc
!=
NULL
&&
obj_num
!=
0
)
{
child_rc
=
ll_get_next
(
&
cont
->
child_ll
,
child_rc
);
}
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
++
;
...
...
@@ -449,11 +456,6 @@ static void lv_cont_layout_pretty(lv_obj_t * cont)
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 (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
)
{
if
(
child_rc
!=
NULL
)
{
...
...
lv_objx/lv_win.c
View file @
6f1d63bf
...
...
@@ -108,10 +108,6 @@ lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy)
lv_win_ext_t
*
copy_ext
=
lv_obj_get_ext
(
copy
);
/*Create the objects*/
ext
->
header
=
lv_cont_create
(
new_win
,
copy_ext
->
header
);
/*Move back the header because it is automatically moved to the scrollable */
lv_obj_set_protect
(
ext
->
header
,
LV_PROTECT_PARENT
);
lv_obj_set_parent
(
ext
->
header
,
new_win
);
ext
->
title
=
lv_label_create
(
ext
->
header
,
copy_ext
->
title
);
ext
->
btnh
=
lv_cont_create
(
ext
->
header
,
copy_ext
->
btnh
);
...
...
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