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
d6ccc489
Commit
d6ccc489
authored
Oct 03, 2017
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_ta: LINE and UNDERLINE cursor aligned symmetrically
parent
974540cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lv_ta.c
lv_objx/lv_ta.c
+4
-4
No files found.
lv_objx/lv_ta.c
View file @
d6ccc489
...
...
@@ -895,9 +895,9 @@ static bool lv_ta_scrling_design(lv_obj_t * scrl, const area_t * mask, lv_design
/*Draw he cursor according to the type*/
area_t
cur_area
;
if
(
ta_ext
->
cursor_type
==
LV_TA_CURSOR_LINE
)
{
cur_area
.
x1
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
;
cur_area
.
x1
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
-
(
cur_style
.
line_width
>>
1
)
-
(
cur_style
.
line_width
&
0x1
)
;
cur_area
.
y1
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
;
cur_area
.
x2
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
+
cur_style
.
line_width
;
cur_area
.
x2
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
+
(
cur_style
.
line_width
>>
1
)
;
cur_area
.
y2
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
+
letter_h
;
lv_draw_rect
(
&
cur_area
,
mask
,
&
cur_style
);
}
else
if
(
ta_ext
->
cursor_type
==
LV_TA_CURSOR_BLOCK
)
{
...
...
@@ -924,9 +924,9 @@ static bool lv_ta_scrling_design(lv_obj_t * scrl, const area_t * mask, lv_design
lv_draw_rect
(
&
cur_area
,
mask
,
&
cur_style
);
}
else
if
(
ta_ext
->
cursor_type
==
LV_TA_CURSOR_UNDERLINE
)
{
cur_area
.
x1
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
;
cur_area
.
y1
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
+
letter_h
-
cur_style
.
line_width
;
cur_area
.
y1
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
+
letter_h
-
(
cur_style
.
line_width
>>
1
)
;
cur_area
.
x2
=
letter_pos
.
x
+
ta_ext
->
label
->
cords
.
x1
+
letter_w
;
cur_area
.
y2
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
+
letter_h
;
cur_area
.
y2
=
letter_pos
.
y
+
ta_ext
->
label
->
cords
.
y1
+
letter_h
+
(
cur_style
.
line_width
>>
1
)
+
(
cur_style
.
line_width
&
0x1
)
;
lv_draw_rect
(
&
cur_area
,
mask
,
&
cur_style
);
}
...
...
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