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
7248eef1
Commit
7248eef1
authored
Jul 27, 2017
by
Gabor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into examples
parents
42248153
6cd9fda0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lv_cont.c
lv_objx/lv_cont.c
+11
-2
No files found.
lv_objx/lv_cont.c
View file @
7248eef1
/**
* @file lv_
rec
t.c
* @file lv_
con
t.c
*
*/
...
...
@@ -465,10 +465,19 @@ static void lv_cont_layout_pretty(lv_obj_t * cont)
h_row
=
lv_obj_get_height
(
child_rc
);
/*Not set previously because of the early break*/
}
}
/*If here is only one object in the row then align it to the middle*/
/*If
t
here is only one object in the row then align it to the middle*/
else
if
(
obj_num
==
1
)
{
lv_obj_align
(
child_rs
,
cont
,
LV_ALIGN_IN_TOP_MID
,
0
,
act_y
);
}
/*If are two object in the row then align them proportionally*/
else
if
(
obj_num
==
2
)
{
lv_obj_t
*
obj1
=
child_rs
;
lv_obj_t
*
obj2
=
ll_get_prev
(
&
cont
->
child_ll
,
child_rs
);
w_row
=
lv_obj_get_width
(
obj1
)
+
lv_obj_get_width
(
obj2
);
cord_t
pad
=
(
w_obj
-
w_row
)
/
3
;
lv_obj_align
(
obj1
,
cont
,
LV_ALIGN_IN_TOP_LEFT
,
pad
,
act_y
);
lv_obj_align
(
obj2
,
cont
,
LV_ALIGN_IN_TOP_RIGHT
,
-
pad
,
act_y
);
}
/* Align the children (from child_rs to child_rc)*/
else
{
w_row
-=
style
->
opad
*
obj_num
;
...
...
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