aboutsummaryrefslogtreecommitdiffstats
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
parentadd a reset button to reset the key bindings (diff)
downloadterminology-d9276909a4462a2c5d8d02b243216bac9aef002d.tar.gz
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)
}
}
+static void
+_cb_font_bolditalic(void *data, Evas_Object *obj,
+ void *event EINA_UNUSED)
+{
+ Evas_Object *term = data;
+ Config *config = termio_config_get(term);
+
+ config->font.bolditalic = elm_check_state_get(obj);
+ termio_config_update(term);
+ config_save(config, NULL);
+}
+
void
options_font(Evas_Object *opbox, Evas_Object *term)
{
@@ -522,6 +534,16 @@ options_font(Evas_Object *opbox, Evas_Object *term)
evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(o);
+ o = elm_check_add(bx0);
+ 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_object_text_set(o, _("Display bold and italic in the terminal"));
+ elm_check_state_set(o, config->font.bolditalic);
+ elm_box_pack_end(bx0, o);
+ evas_object_show(o);
+ evas_object_smart_callback_add(o, "changed",
+ _cb_font_bolditalic, term);
+
expecting_resize = 0;
evas_object_geometry_get(term, NULL, NULL, &tsize_w, &tsize_h);
evas_object_event_callback_add(term, EVAS_CALLBACK_RESIZE,