efl_ui_scrollable: add step size property

Summary: The step size property determines amount of scroll by arrow key event.

Test Plan: elementary_test -> efl.ui.scroller

Reviewers: bu5hm4n, woohyun, cedric

Reviewed By: bu5hm4n, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7916
This commit is contained in:
Hosang Kim 2019-02-25 21:22:43 +09:00 committed by 김호상/Tizen Platform Lab(SR)/Engineer/삼성전자
parent 5235f1da85
commit f92eb7f54c
3 changed files with 27 additions and 0 deletions

View File

@ -137,6 +137,19 @@ interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
h: bool; [[Whether to limit the minimum vertical size]]
}
}
@property step_size {
[[Control the step size
Use this call to set step size.
This value is used when scroller scroll by arrow key event.]]
set {
}
get {
}
values {
step: Eina.Position2D; [[The step size in pixels]]
}
}
scroll {
[[Show a specific virtual region within the scroller content object.

View File

@ -274,6 +274,19 @@ _efl_ui_scroll_manager_efl_ui_scrollable_interactive_match_content_set(Eo *obj E
sd->match_content_h = !!h;
}
EOLIAN static void
_efl_ui_scroll_manager_efl_ui_scrollable_interactive_step_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd, Eina_Position2D step)
{
sd->step.x = step.x * elm_config_scale_get();
sd->step.y = step.y * elm_config_scale_get();
}
EOLIAN static Eina_Position2D
_efl_ui_scroll_manager_efl_ui_scrollable_interactive_step_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Scroll_Manager_Data *sd)
{
return EINA_POSITION2D(sd->step.x, sd->step.y);
}
static Evas_Coord
_efl_ui_scroll_manager_x_mirrored_get(const Evas_Object *obj,
Evas_Coord x)

View File

@ -35,6 +35,7 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements
Efl.Ui.Scrollable_Interactive.movement_block { get; set; }
Efl.Ui.Scrollable_Interactive.gravity { get; set; }
Efl.Ui.Scrollable_Interactive.match_content { set; }
Efl.Ui.Scrollable_Interactive.step_size { set; get; }
Efl.Ui.Scrollbar.bar_mode { get; set; }
Efl.Ui.Scrollbar.bar_size { get; }
Efl.Ui.Scrollbar.bar_position { get; set; }