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
d1889b77
Commit
d1889b77
authored
Mar 29, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_slider: inicator draw bugfix
parent
e8a9d1bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lv_bar.c
lv_objx/lv_bar.c
+2
-2
lv_slider.c
lv_objx/lv_slider.c
+2
-2
No files found.
lv_objx/lv_bar.c
View file @
d1889b77
...
...
@@ -286,10 +286,10 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode
if
(
w
>=
h
)
{
indic_area
.
x2
=
(
int32_t
)
((
int32_t
)
w
*
(
ext
->
cur_value
-
ext
->
min_value
))
/
(
ext
->
max_value
-
ext
->
min_value
);
indic_area
.
x2
+=
indic_area
.
x
1
;
indic_area
.
x2
=
indic_area
.
x1
+
indic_area
.
x2
-
1
;
}
else
{
indic_area
.
y1
=
(
int32_t
)
((
int32_t
)
h
*
(
ext
->
cur_value
-
ext
->
min_value
))
/
(
ext
->
max_value
-
ext
->
min_value
);
indic_area
.
y1
=
indic_area
.
y2
-
indic_area
.
y1
;
indic_area
.
y1
=
indic_area
.
y2
-
indic_area
.
y1
+
1
;
}
/*Draw the indicator*/
...
...
lv_objx/lv_slider.c
View file @
d1889b77
...
...
@@ -309,11 +309,11 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig
if
(
slider_w
>=
slider_h
)
{
area_indic
.
x2
=
(
int32_t
)
((
int32_t
)
lv_area_get_width
(
&
area_indic
)
*
(
cur_value
-
min_value
))
/
(
max_value
-
min_value
);
area_indic
.
x2
+=
area_indic
.
x
1
;
area_indic
.
x2
=
area_indic
.
x1
+
area_indic
.
x2
-
1
;
}
else
{
area_indic
.
y1
=
(
int32_t
)
((
int32_t
)
lv_area_get_height
(
&
area_indic
)
*
(
cur_value
-
min_value
))
/
(
max_value
-
min_value
);
area_indic
.
y1
=
area_indic
.
y2
-
area_indic
.
y1
;
area_indic
.
y1
=
area_indic
.
y2
-
area_indic
.
y1
+
1
;
}
if
(
cur_value
!=
min_value
)
lv_draw_rect
(
&
area_indic
,
mask
,
style_indic
);
...
...
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