summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-03-18 20:04:10 +0100
committerBoris Faure <billiob@gmail.com>2016-03-18 20:04:10 +0100
commitd9276909a4462a2c5d8d02b243216bac9aef002d (patch)
tree55b06ddd99d5324b391f81aa125004c66dafe0a7 /src/bin/options_font.c
parenta0b7fae2dd51480df0fd7c5213adf27b789c3141 (diff)
add option to enable bold/italic (on by default)
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index 1455bbf..c7abe28 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -342,6 +342,18 @@ options_font_clear(void)
342 } 342 }
343} 343}
344 344
345static void
346_cb_font_bolditalic(void *data, Evas_Object *obj,
347 void *event EINA_UNUSED)
348{
349 Evas_Object *term = data;
350 Config *config = termio_config_get(term);
351
352 config->font.bolditalic = elm_check_state_get(obj);
353 termio_config_update(term);
354 config_save(config, NULL);
355}
356
345void 357void
346options_font(Evas_Object *opbox, Evas_Object *term) 358options_font(Evas_Object *opbox, Evas_Object *term)
347{ 359{
@@ -522,6 +534,16 @@ options_font(Evas_Object *opbox, Evas_Object *term)
522 evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, EVAS_HINT_FILL); 534 evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
523 evas_object_show(o); 535 evas_object_show(o);
524 536
537 o = elm_check_add(bx0);
538 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
539 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
540 elm_object_text_set(o, _("Display bold and italic in the terminal"));
541 elm_check_state_set(o, config->font.bolditalic);
542 elm_box_pack_end(bx0, o);
543 evas_object_show(o);
544 evas_object_smart_callback_add(o, "changed",
545 _cb_font_bolditalic, term);
546
525 expecting_resize = 0; 547 expecting_resize = 0;
526 evas_object_geometry_get(term, NULL, NULL, &tsize_w, &tsize_h); 548 evas_object_geometry_get(term, NULL, NULL, &tsize_w, &tsize_h);
527 evas_object_event_callback_add(term, EVAS_CALLBACK_RESIZE, 549 evas_object_event_callback_add(term, EVAS_CALLBACK_RESIZE,