forked from enlightenment/terminology
options: move shine slider to Background
This commit is contained in:
parent
adb818b697
commit
c1850f73b0
|
@ -40,6 +40,29 @@ static Ecore_Timer *_bubble_disappear;
|
|||
|
||||
static Ecore_Thread *_thread;
|
||||
static Evas_Object *op_trans, *op_opacity;
|
||||
static Evas_Object *op_shine_slider = NULL;
|
||||
|
||||
static void
|
||||
_cb_op_shine_sel(void *data,
|
||||
Evas_Object *obj,
|
||||
void *_event EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *termio_obj = data;
|
||||
Config *config = termio_config_get(termio_obj);
|
||||
Term *term = termio_term_get(termio_obj);
|
||||
Win *wn = term_win_get(term);
|
||||
int shine = elm_slider_value_get(obj);
|
||||
Eina_List *l, *wn_list;
|
||||
|
||||
if (config->shine == shine)
|
||||
return;
|
||||
|
||||
wn_list = win_terms_get(wn);
|
||||
EINA_LIST_FOREACH(wn_list, l, term)
|
||||
{
|
||||
term_apply_shine(term, shine);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_op_video_trans_chg(void *data,
|
||||
|
@ -488,6 +511,32 @@ options_background(Evas_Object *opbox, Evas_Object *term)
|
|||
elm_object_part_content_set(_flip, "front", bx);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_label_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
||||
elm_object_text_set(o, _("Shine:"));
|
||||
elm_box_pack_end(bx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
op_shine_slider = o = elm_slider_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
||||
elm_slider_span_size_set(o, 40);
|
||||
elm_slider_unit_format_set(o, "%1.0f");
|
||||
elm_slider_indicator_format_set(o, "%1.0f");
|
||||
elm_slider_min_max_set(o, 0, 255);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
elm_slider_step_set(o, 1);
|
||||
#endif
|
||||
elm_slider_value_set(o, config->shine);
|
||||
elm_box_pack_end(bx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
evas_object_smart_callback_add(o, "delay,changed",
|
||||
_cb_op_shine_sel, term);
|
||||
|
||||
|
||||
|
||||
op_trans = o = elm_check_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
||||
|
|
|
@ -21,29 +21,6 @@ struct _Theme
|
|||
static Evas_Object *op_themelist;
|
||||
static Eina_List *themes = NULL;
|
||||
static Ecore_Timer *seltimer = NULL;
|
||||
static Evas_Object *op_shine_slider = NULL;
|
||||
|
||||
static void
|
||||
_cb_op_shine_sel(void *data,
|
||||
Evas_Object *obj,
|
||||
void *_event EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *termio_obj = data;
|
||||
Config *config = termio_config_get(termio_obj);
|
||||
Term *term = termio_term_get(termio_obj);
|
||||
Win *wn = term_win_get(term);
|
||||
int shine = elm_slider_value_get(obj);
|
||||
Eina_List *l, *wn_list;
|
||||
|
||||
if (config->shine == shine)
|
||||
return;
|
||||
|
||||
wn_list = win_terms_get(wn);
|
||||
EINA_LIST_FOREACH(wn_list, l, term)
|
||||
{
|
||||
term_apply_shine(term, shine);
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
_cb_op_theme_text_get(void *data,
|
||||
|
@ -148,31 +125,6 @@ options_theme(Evas_Object *opbox, Evas_Object *term)
|
|||
elm_object_content_set(fr, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_label_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
||||
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
||||
elm_object_text_set(o, _("Shine:"));
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
op_shine_slider = o = elm_slider_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
||||
elm_slider_span_size_set(o, 40);
|
||||
elm_slider_unit_format_set(o, "%1.0f");
|
||||
elm_slider_indicator_format_set(o, "%1.0f");
|
||||
elm_slider_min_max_set(o, 0, 255);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
elm_slider_step_set(o, 1);
|
||||
#endif
|
||||
elm_slider_value_set(o, config->shine);
|
||||
elm_box_pack_end(box, o);
|
||||
evas_object_show(o);
|
||||
|
||||
evas_object_smart_callback_add(o, "delay,changed",
|
||||
_cb_op_shine_sel, term);
|
||||
|
||||
|
||||
it_class = elm_gengrid_item_class_new();
|
||||
it_class->item_style = "thumb";
|
||||
it_class->func.text_get = _cb_op_theme_text_get;
|
||||
|
|
Loading…
Reference in New Issue