summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2021-03-08 13:54:09 +0000
committerAlastair Poole <netstar@gmail.com>2021-03-08 13:54:09 +0000
commit848cc27355f21dba0804343ccd40e750ddb9153c (patch)
treeac832bec72f2baa2e8f160aa2550d5d8d59a9b28 /src/bin/options_font.c
parent816fe88aaa94354e9e854af60654d2793f711308 (diff)
options_font: focus font search entry.
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index d34e3be..d9035ab 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -464,6 +464,16 @@ _parent_del_cb(void *data,
464 free(ctx); 464 free(ctx);
465} 465}
466 466
467static Eina_Bool
468_show_timer_cb(void *data)
469{
470 Font_Ctx *ctx = data;
471
472 elm_object_focus_set(ctx->filter, EINA_TRUE);
473
474 return EINA_FALSE;
475}
476
467void 477void
468options_font(Evas_Object *opbox, Evas_Object *term) 478options_font(Evas_Object *opbox, Evas_Object *term)
469{ 479{
@@ -533,8 +543,8 @@ options_font(Evas_Object *opbox, Evas_Object *term)
533 evas_object_show(bx); 543 evas_object_show(bx);
534 544
535 ctx->filter = o = elm_entry_add(bx); 545 ctx->filter = o = elm_entry_add(bx);
536 elm_object_focus_set(o, EINA_TRUE);
537 elm_entry_single_line_set(o, EINA_TRUE); 546 elm_entry_single_line_set(o, EINA_TRUE);
547 elm_entry_scrollable_set(o, EINA_TRUE);
538 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 548 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
539 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); 549 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
540 elm_object_part_text_set(o, "guide", _("Search font")); 550 elm_object_part_text_set(o, "guide", _("Search font"));
@@ -680,7 +690,8 @@ options_font(Evas_Object *opbox, Evas_Object *term)
680 evas_object_event_callback_add(term, EVAS_CALLBACK_RESIZE, 690 evas_object_event_callback_add(term, EVAS_CALLBACK_RESIZE,
681 _cb_term_resize, ctx); 691 _cb_term_resize, ctx);
682 692
683 elm_object_focus_set(ctx->filter, EINA_TRUE); 693 ecore_timer_add(0.2, _show_timer_cb, ctx);
694
684 evas_object_smart_callback_add(ctx->filter, "changed,user", 695 evas_object_smart_callback_add(ctx->filter, "changed,user",
685 _entry_change_cb, ctx); 696 _entry_change_cb, ctx);
686} 697}