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
bf8cf9fb
Commit
bf8cf9fb
authored
Oct 11, 2017
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_label: scroll anim position bugifx
parent
a7a6812a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
lv_label.c
lv_objx/lv_label.c
+19
-16
No files found.
lv_objx/lv_label.c
View file @
bf8cf9fb
...
...
@@ -132,20 +132,23 @@ bool lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param)
* make the object specific signal handling */
if
(
valid
!=
false
)
{
lv_label_ext_t
*
ext
=
lv_obj_get_ext
(
label
);
/*No signal handling*/
switch
(
sign
)
{
case
LV_SIGNAL_CLEANUP
:
if
(
ext
->
static_txt
==
0
)
{
dm_free
(
ext
->
txt
);
ext
->
txt
=
NULL
;
}
break
;
case
LV_SIGNAL_STYLE_CHG
:
lv_label_set_text
(
label
,
NULL
);
break
;
default:
break
;
}
if
(
sign
==
LV_SIGNAL_CLEANUP
)
{
if
(
ext
->
static_txt
==
0
)
{
dm_free
(
ext
->
txt
);
ext
->
txt
=
NULL
;
}
}
else
if
(
sign
==
LV_SIGNAL_STYLE_CHG
)
{
lv_label_refr_text
(
label
);
}
else
if
(
sign
==
LV_SIGNAL_CORD_CHG
)
{
if
(
area_get_width
(
&
label
->
cords
)
!=
area_get_width
(
param
)
||
area_get_height
(
&
label
->
cords
)
!=
area_get_height
(
param
))
{
lv_label_refr_text
(
label
);
}
}
}
return
valid
;
...
...
@@ -624,7 +627,7 @@ static void lv_label_refr_text(lv_obj_t * label)
if
(
lv_obj_get_height
(
label
)
>
lv_obj_get_height
(
parent
))
{
anim
.
end
=
lv_obj_get_height
(
parent
)
-
lv_obj_get_height
(
label
)
-
(
font_get_height
(
font
)
-
FONT_ANTIALIAS
);
(
font_get_height
(
font
)
>>
FONT_ANTIALIAS
);
anim
.
fp
=
(
anim_fp_t
)
lv_obj_set_y
;
/*Different animation speed if horizontal animation is created too*/
...
...
@@ -662,7 +665,7 @@ static void lv_label_refr_text(lv_obj_t * label)
if
(
size
.
y
>
lv_obj_get_height
(
label
))
{
anim
.
end
=
lv_obj_get_height
(
label
)
-
size
.
y
-
(
font_get_height
(
font
)
-
FONT_ANTIALIAS
);
(
font_get_height
(
font
)
>>
FONT_ANTIALIAS
);
anim
.
fp
=
(
anim_fp_t
)
lv_label_set_offset_y
;
/*Different animation speed if horizontal animation is created too*/
...
...
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