Make scale work a little better...

This commit is contained in:
Jaime Thomas
2009-01-16 04:07:47 +00:00
parent a4ef973a31
commit 465756bb63
12 changed files with 51 additions and 6 deletions

View File

@ -183,6 +183,7 @@ ecdb_create_main_gui(void)
Evas_Object *gui;
Evas_Coord mw, mh;
const char *scale;
float scalef;
/* This would be wonderful, but its a bit glitchy
em->main_win_ee = ecore_evas_gl_x11_new(0, 0, 0, 0, 255, 255);
@ -216,14 +217,16 @@ ecdb_create_main_gui(void)
/* Make this configurable at some point */
ecdb_set_main_theme(NULL);
scale = getenv("ECDB_SCALE");
if (scale)
edje_scale_set(atof(scale));
scalef = (scale) ? atof(scale) : 1.0;
edje_scale_set(scalef);
gui = edje_object_add(ecore_evas_get(em->main_win_ee));
edje_object_file_set(gui, em->theme_path, "ecdb/window");
edje_object_size_min_get(gui, &mw, &mh);
if (mw <= 0) mw = 400;
if (mh <= 0) mh = 300;
mw = (int)((float)mw * scalef);
mh = (int)((float)mh * scalef);
evas_object_resize(gui, mw, mh);
ecore_evas_resize(em->main_win_ee, mw, mh);
ecore_evas_size_min_set(em->main_win_ee, mw, mh);

View File

@ -889,7 +889,8 @@ ecdb_combo_expand(Evas_Object *c)
min_size = edje_object_data_get(o, "ecdb/combo_item/minh");
if (min_size)
{
h2 += atoi(min_size);
// FIXME Change this to config val
h2 += (int)(atof(min_size) * edje_scale_get());
}
else
{