forked from enlightenment/terminology
fix cursor and fontpreview when theme is an absolute path.
SVN revision: 72308
This commit is contained in:
parent
7f0c9cdc47
commit
03e58cbad2
|
@ -207,14 +207,21 @@ elm_main(int argc, char **argv)
|
|||
|
||||
if (theme)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
char name[PATH_MAX];
|
||||
|
||||
if (eina_str_has_suffix(theme, ".edj"))
|
||||
eina_stringshare_replace(&(config->theme), theme);
|
||||
eina_strlcpy(name, theme, sizeof(name));
|
||||
else
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
snprintf(buf, sizeof(buf), "%s.edj", theme);
|
||||
eina_stringshare_replace(&(config->theme), buf);
|
||||
}
|
||||
snprintf(name, sizeof(name), "%s.edj", theme);
|
||||
|
||||
if (strchr(name, '/'))
|
||||
eina_strlcpy(path, name, sizeof(path));
|
||||
else
|
||||
snprintf(path, sizeof(path), "%s/themes/%s",
|
||||
elm_app_data_dir_get(), name);
|
||||
|
||||
eina_stringshare_replace(&(config->theme), path);
|
||||
config_tmp = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -250,15 +257,7 @@ elm_main(int argc, char **argv)
|
|||
bg = o = edje_object_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_fill_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
if (strchr(config->theme, '/'))
|
||||
edje_object_file_set(o, config->theme, "terminology/background");
|
||||
else
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
snprintf(buf, sizeof(buf), "%s/themes/%s",
|
||||
elm_app_data_dir_get(), config->theme);
|
||||
edje_object_file_set(o, buf, "terminology/background");
|
||||
}
|
||||
edje_object_file_set(o, config->theme, "terminology/background");
|
||||
elm_win_resize_object_add(win, o);
|
||||
evas_object_show(o);
|
||||
|
||||
|
|
|
@ -120,12 +120,9 @@ _cb_op_font_content_get(void *data, Evas_Object *obj, const char *part)
|
|||
(!strcmp(part, "elm.swallow.end")))
|
||||
{
|
||||
Evas_Object *o;
|
||||
char buf[4096];
|
||||
|
||||
|
||||
o = edje_object_add(evas_object_evas_get(obj));
|
||||
snprintf(buf, sizeof(buf), "%s/themes/%s",
|
||||
elm_app_data_dir_get(), config->theme);
|
||||
edje_object_file_set(o, buf, "terminology/fontpreview");
|
||||
edje_object_file_set(o, config->theme, "terminology/fontpreview");
|
||||
evas_object_size_hint_min_set(o,
|
||||
40 * elm_config_scale_get(),
|
||||
40 * elm_config_scale_get());
|
||||
|
|
|
@ -720,9 +720,7 @@ _smart_add(Evas_Object *obj)
|
|||
evas_object_propagate_events_set(o, EINA_FALSE);
|
||||
evas_object_smart_member_add(o, obj);
|
||||
sd->cur.obj = o;
|
||||
snprintf(buf, sizeof(buf), "%s/themes/%s",
|
||||
elm_app_data_dir_get(), config->theme);
|
||||
edje_object_file_set(o, buf, "terminology/cursor");
|
||||
edje_object_file_set(o, config->theme, "terminology/cursor");
|
||||
evas_object_resize(o, sd->font.chw, sd->font.chh);
|
||||
evas_object_show(o);
|
||||
|
||||
|
|
Loading…
Reference in New Issue