option_background: add opacity label

This commit is contained in:
Boris Faure 2022-10-04 22:19:20 +02:00
parent 0906e3d716
commit f68b02c182
Signed by: borisfaure
GPG Key ID: EAA9CD729F522998
1 changed files with 9 additions and 3 deletions

View File

@ -521,7 +521,7 @@ _parent_del_cb(void *data,
void void
options_background(Evas_Object *opbox, Evas_Object *term) options_background(Evas_Object *opbox, Evas_Object *term)
{ {
Evas_Object *o, *bx, *bx_front; Evas_Object *o, *bx, *bx_front, *lbl;
Config *config = termio_config_get(term); Config *config = termio_config_get(term);
char path[PATH_MAX]; char path[PATH_MAX];
Background_Ctx *ctx; Background_Ctx *ctx;
@ -558,6 +558,14 @@ options_background(Evas_Object *opbox, Evas_Object *term)
evas_object_smart_callback_add(o, "changed", evas_object_smart_callback_add(o, "changed",
_cb_op_video_trans_chg, ctx); _cb_op_video_trans_chg, ctx);
OPTIONS_SEPARATOR;
lbl = elm_label_add(bx);
evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(lbl, 0.0, 0.0);
elm_layout_text_set(lbl, NULL, _("Opacity:"));
elm_box_pack_end(bx, lbl);
evas_object_show(lbl);
ctx->op_opacity = o = elm_slider_add(opbox); ctx->op_opacity = o = elm_slider_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
@ -640,8 +648,6 @@ options_background(Evas_Object *opbox, Evas_Object *term)
elm_box_pack_end(bx_front, o); elm_box_pack_end(bx_front, o);
evas_object_show(o); evas_object_show(o);
o = elm_fileselector_add(opbox); o = elm_fileselector_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);