summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2013-09-07 17:53:06 +0200
committerBoris Faure <billiob@gmail.com>2013-09-07 18:39:22 +0200
commit71d4f155be9c81841d861d1451844043ed3cb3c8 (patch)
tree235e56daff917e1fe82b2d31ab7e801ba50bb25f
parentb140380776b758d3d8c1682896787e4b5291fd5a (diff)
change cursor/selection when changing theme
-rw-r--r--src/bin/options_theme.c1
-rw-r--r--src/bin/termio.c11
-rw-r--r--src/bin/termio.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/src/bin/options_theme.c b/src/bin/options_theme.c
index 56f6207..dddda4c 100644
--- a/src/bin/options_theme.c
+++ b/src/bin/options_theme.c
@@ -70,6 +70,7 @@ _cb_op_theme_sel(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUS
70 if (!theme_apply(edje, config, "terminology/background")) 70 if (!theme_apply(edje, config, "terminology/background"))
71 ERR("Couldn't find terminology theme!"); 71 ERR("Couldn't find terminology theme!");
72 colors_term_init(termio_textgrid_get(t->term), edje); 72 colors_term_init(termio_textgrid_get(t->term), edje);
73 termio_config_set(t->term, config);
73} 74}
74 75
75static int 76static int
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 97867c0..5c3e9a8 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3291,8 +3291,8 @@ _win_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event EINA
3291 } 3291 }
3292} 3292}
3293 3293
3294static void 3294void
3295_termio_config_set(Evas_Object *obj, Config *config) 3295termio_config_set(Evas_Object *obj, Config *config)
3296{ 3296{
3297 Termio *sd = evas_object_smart_data_get(obj); 3297 Termio *sd = evas_object_smart_data_get(obj);
3298 Evas_Coord w = 2, h = 2; 3298 Evas_Coord w = 2, h = 2;
@@ -3315,7 +3315,10 @@ _termio_config_set(Evas_Object *obj, Config *config)
3315 3315
3316 evas_object_scale_set(sd->grid.obj, elm_config_scale_get()); 3316 evas_object_scale_set(sd->grid.obj, elm_config_scale_get());
3317 evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size); 3317 evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size);
3318 evas_object_textgrid_size_set(sd->grid.obj, 1, 1); 3318 evas_object_textgrid_size_get(sd->grid.obj, &w, &h);
3319 if (w < 1) w = 1;
3320 if (h < 1) h = 1;
3321 evas_object_textgrid_size_set(sd->grid.obj, w, h);
3319 evas_object_textgrid_cell_size_get(sd->grid.obj, &w, &h); 3322 evas_object_textgrid_cell_size_get(sd->grid.obj, &w, &h);
3320 if (w < 1) w = 1; 3323 if (w < 1) w = 1;
3321 if (h < 1) h = 1; 3324 if (h < 1) h = 1;
@@ -4129,7 +4132,7 @@ termio_add(Evas_Object *parent, Config *config, const char *cmd, Eina_Bool login
4129 sd = evas_object_smart_data_get(obj); 4132 sd = evas_object_smart_data_get(obj);
4130 if (!sd) return obj; 4133 if (!sd) return obj;
4131 4134
4132 _termio_config_set(obj, config); 4135 termio_config_set(obj, config);
4133 4136
4134 sd->glayer = g = elm_gesture_layer_add(parent); 4137 sd->glayer = g = elm_gesture_layer_add(parent);
4135 elm_gesture_layer_attach(g, sd->event); 4138 elm_gesture_layer_attach(g, sd->event);
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 485a311..f6e82dc 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -30,5 +30,6 @@ Evas_Object *termio_mirror_add(Evas_Object *obj);
30const char *termio_title_get(Evas_Object *obj); 30const char *termio_title_get(Evas_Object *obj);
31const char *termio_icon_name_get(Evas_Object *obj); 31const char *termio_icon_name_get(Evas_Object *obj);
32void termio_debugwhite_set(Evas_Object *obj, Eina_Bool dbg); 32void termio_debugwhite_set(Evas_Object *obj, Eina_Bool dbg);
33void termio_config_set(Evas_Object *obj, Config *config);
33 34
34#endif 35#endif