summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-07-14 22:10:54 +0200
committerBoris Faure <billiob@gmail.com>2017-07-14 22:10:54 +0200
commite7b3265662cb122a401c2e6e49cdac985e4d6d0d (patch)
tree94fdb43a5bc0196e3025605363d868c3752f8d4d /src/bin/options_font.c
parent70c4ba6fdb6758edc318aabef97f94147b5d68fa (diff)
font: update all terms to this window when changing font (size)
Closes T5012 Closes T5445
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index ab13185..f856c71 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -134,6 +134,8 @@ _cb_op_font_sel(void *data,
134{ 134{
135 Font *f = data; 135 Font *f = data;
136 Config *config = termio_config_get(f->term); 136 Config *config = termio_config_get(f->term);
137 Term *term = termio_term_get(f->term);
138
137 if ((config->font.name) && (!strcmp(f->full_name, config->font.name))) 139 if ((config->font.name) && (!strcmp(f->full_name, config->font.name)))
138 return; 140 return;
139 if (config->font.name) eina_stringshare_del(config->font.name); 141 if (config->font.name) eina_stringshare_del(config->font.name);
@@ -144,6 +146,7 @@ _cb_op_font_sel(void *data,
144 elm_object_disabled_set(op_fontslider, f->bitmap); 146 elm_object_disabled_set(op_fontslider, f->bitmap);
145 elm_object_disabled_set(op_fbig, f->bitmap); 147 elm_object_disabled_set(op_fbig, f->bitmap);
146 config_save(config, NULL); 148 config_save(config, NULL);
149 win_font_update(term);
147} 150}
148 151
149static void 152static void
@@ -151,15 +154,17 @@ _cb_op_fontsize_sel(void *data,
151 Evas_Object *obj, 154 Evas_Object *obj,
152 void *_event EINA_UNUSED) 155 void *_event EINA_UNUSED)
153{ 156{
154 Evas_Object *term = data; 157 Evas_Object *termio_obj = data;
155 Config *config = termio_config_get(term); 158 Config *config = termio_config_get(termio_obj);
159 Term *term = termio_term_get(termio_obj);
156 int size = elm_slider_value_get(obj) + 0.5; 160 int size = elm_slider_value_get(obj) + 0.5;
157 161
158 if (config->font.size == size) return; 162 if (config->font.size == size) return;
159 config->font.size = size; 163 config->font.size = size;
160 _update_sizing(term); 164 _update_sizing(termio_obj);
161 elm_genlist_realized_items_update(op_fontlist); 165 elm_genlist_realized_items_update(op_fontlist);
162 config_save(config, NULL); 166 config_save(config, NULL);
167 win_font_update(term);
163} 168}
164 169
165static int 170static int