diff --git a/src/modules/illume-keyboard/e_kbd_int.c b/src/modules/illume-keyboard/e_kbd_int.c index f5b5aafb9..2d43caeee 100644 --- a/src/modules/illume-keyboard/e_kbd_int.c +++ b/src/modules/illume-keyboard/e_kbd_int.c @@ -979,7 +979,7 @@ _e_kbd_int_layout_parse(E_Kbd_Int *ki, const char *layout) if (sscanf(buf, "%4000s", str) != 1) continue; if (!strcmp(str, "kbd")) { - if (sscanf(buf, "%*s %i %i\n", &(ki->layout.w), &(ki->layout.h)) != 2) + if (sscanf(buf, "%*s %i %i\n", &(ki->layout.w), &(ki->layout.orig_h)) != 2) continue; } if (!strcmp(str, "fuzz")) @@ -1004,7 +1004,7 @@ _e_kbd_int_layout_parse(E_Kbd_Int *ki, const char *layout) { ky = calloc(1, sizeof(E_Kbd_Int_Key)); if (!ky) continue; - if (sscanf(buf, "%*s %i %i %i %i\n", &(ky->x), &(ky->y), &(ky->w), &(ky->h)) != 4) + if (sscanf(buf, "%*s %i %i %i %i\n", &(ky->x), &(ky->orig_y), &(ky->w), &(ky->orig_h)) != 4) { free(ky); ky = NULL; @@ -1055,6 +1055,8 @@ _e_kbd_int_layout_build(E_Kbd_Int *ki) Evas_Coord lw, lh; Eina_List *l; + ki->layout.h = ki->layout.orig_h * il_kbd_cfg->scale_height; + evas_event_freeze(ki->win->evas); e_layout_virtual_size_set(ki->layout_obj, ki->layout.w, ki->layout.h); edje_extern_object_aspect_set(ki->layout_obj, EDJE_ASPECT_CONTROL_BOTH, @@ -1073,6 +1075,9 @@ _e_kbd_int_layout_build(E_Kbd_Int *ki) E_Kbd_Int_Key_State *st; const char *label, *icon; + ky->y = ky->orig_y * il_kbd_cfg->scale_height; + ky->h = ky->orig_h * il_kbd_cfg->scale_height; + o = _theme_obj_new(ki->win->evas, ki->themedir, "e/modules/kbd/key/default"); ky->obj = o; diff --git a/src/modules/illume-keyboard/e_kbd_int.h b/src/modules/illume-keyboard/e_kbd_int.h index 1998e45ac..033a89149 100644 --- a/src/modules/illume-keyboard/e_kbd_int.h +++ b/src/modules/illume-keyboard/e_kbd_int.h @@ -46,7 +46,7 @@ struct _E_Kbd_Int struct { char *directory; const char *file; - int w, h; + int w, h, orig_h; int fuzz; int direction; E_Kbd_Int_Type type; @@ -87,7 +87,7 @@ struct _E_Kbd_Int struct _E_Kbd_Int_Key { - int x, y, w, h; + int x, y, w, h, orig_y, orig_h; Eina_List *states; Evas_Object *obj, *zoom_obj, *icon_obj, *zoom_icon_obj; diff --git a/src/modules/illume-keyboard/e_mod_config.c b/src/modules/illume-keyboard/e_mod_config.c index ca936a137..4c1989db2 100644 --- a/src/modules/illume-keyboard/e_mod_config.c +++ b/src/modules/illume-keyboard/e_mod_config.c @@ -32,7 +32,8 @@ il_kbd_config_init(E_Module *m) E_CONFIG_VAL(D, T, zoom_level, INT); E_CONFIG_VAL(D, T, hold_timer, DOUBLE); E_CONFIG_VAL(D, T, slide_dim, INT); - + E_CONFIG_VAL(D, T, scale_height, DOUBLE); + il_kbd_cfg = e_config_domain_load("module.illume-keyboard", conf_edd); if ((il_kbd_cfg) && ((il_kbd_cfg->version >> 16) < IL_CONFIG_MAJ)) @@ -50,17 +51,17 @@ il_kbd_config_init(E_Module *m) il_kbd_cfg->zoom_level = 4; il_kbd_cfg->slide_dim = 4; il_kbd_cfg->hold_timer = 0.25; - } if (il_kbd_cfg) { /* Add new config variables here */ /* if ((il_kbd_cfg->version & 0xffff) < 1) */ - if ((il_kbd_cfg->version >> 16) < IL_CONFIG_MAJ) + if ((il_kbd_cfg->version & 0xffff) < IL_CONFIG_MIN) { il_kbd_cfg->zoom_level = 4; il_kbd_cfg->slide_dim = 4; il_kbd_cfg->hold_timer = 0.25; + il_kbd_cfg->scale_height = 1.0; } il_kbd_cfg->version = (IL_CONFIG_MAJ << 16) | IL_CONFIG_MIN; } @@ -225,6 +226,15 @@ _il_kbd_config_ui(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_D NULL, &(il_kbd_cfg->zoom_level), 150); e_widget_framelist_object_append(of, sl); + ol = e_widget_label_add(evas, _("Height")); + e_widget_framelist_object_append(of, ol); + sl = e_widget_slider_add(evas, EINA_TRUE, 0, "%.2f", 0.2, 2.0, 0.1, 0, + &(il_kbd_cfg->scale_height), NULL, 150); + evas_object_smart_callback_add(sl, "changed", + _il_kbd_config_changed, NULL); + + e_widget_framelist_object_append(of, sl); + e_widget_list_object_append(list, of, 1, 0, 0.0); return list; } diff --git a/src/modules/illume-keyboard/e_mod_config.h b/src/modules/illume-keyboard/e_mod_config.h index 3debc42c4..b45a1ddc3 100644 --- a/src/modules/illume-keyboard/e_mod_config.h +++ b/src/modules/illume-keyboard/e_mod_config.h @@ -1,7 +1,7 @@ #ifndef E_MOD_CONFIG_H #define E_MOD_CONFIG_H -#define IL_CONFIG_MIN 0 +#define IL_CONFIG_MIN 2 #define IL_CONFIG_MAJ 1 typedef struct _Il_Kbd_Config Il_Kbd_Config; @@ -18,6 +18,7 @@ struct _Il_Kbd_Config int zoom_level; int slide_dim; double hold_timer; + double scale_height; E_Config_Dialog *cfd; };