From 465756bb63b2cc8a3050722839dd655f8b8f338f Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Fri, 16 Jan 2009 04:07:47 +0000 Subject: [PATCH] Make scale work a little better... --- .../trunk/data/themes/default/groups/burn_data.edc | 8 ++++++++ .../trunk/data/themes/default/groups/burn_image.edc | 6 ++++++ .../ecdb/trunk/data/themes/default/groups/button.edc | 3 +++ .../ecdb/trunk/data/themes/default/groups/capacity.edc | 2 ++ .../ecdb/trunk/data/themes/default/groups/check.edc | 1 + .../ecdb/trunk/data/themes/default/groups/combo.edc | 4 +++- .../trunk/data/themes/default/groups/config_inwin.edc | 1 - .../trunk/data/themes/default/groups/erase_disc.edc | 5 +++++ .../trunk/data/themes/default/groups/welcome_page.edc | 7 ++++++- .../ecdb/trunk/data/themes/default/groups/window.edc | 10 ++++++++++ experimental/ecdb/trunk/src/ecdb_gui.c | 7 +++++-- experimental/ecdb/trunk/src/ecdb_widgets.c | 3 ++- 12 files changed, 51 insertions(+), 6 deletions(-) diff --git a/experimental/ecdb/trunk/data/themes/default/groups/burn_data.edc b/experimental/ecdb/trunk/data/themes/default/groups/burn_data.edc index 5163715c..28019446 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/burn_data.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/burn_data.edc @@ -58,6 +58,7 @@ group { name: "ecdb/burn_data/return"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -80,6 +81,7 @@ group { name: "ecdb/burn_data/begin"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -102,6 +104,7 @@ group { name: "ecdb/burn_data/drive"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -124,6 +127,7 @@ group { name: "ecdb/burn_data/speed"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -146,6 +150,7 @@ group { name: "ecdb/burn_data/settings"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -169,6 +174,7 @@ group { name: "ecdb/burn_data/filelist"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -191,6 +197,7 @@ group { name: "ecdb/burn_data/capacity"; type: SWALLOW; repeat_events: 0; + scale: 1; description { state: "default" 0.0; @@ -314,6 +321,7 @@ group { name: "disabled_hack"; type: RECT; mouse_events: 1; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc b/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc index 16c5ae35..3aed38d4 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/burn_image.edc @@ -79,6 +79,7 @@ group { name: "ecdb/burn_image/return"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -101,6 +102,7 @@ group { name: "ecdb/burn_image/begin"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -123,6 +125,7 @@ group { name: "ecdb/burn_image/file"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -145,6 +148,7 @@ group { name: "ecdb/burn_image/drive"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -167,6 +171,7 @@ group { name: "ecdb/burn_image/speed"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -291,6 +296,7 @@ group { name: "disabled_hack"; type: RECT; mouse_events: 1; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/button.edc b/experimental/ecdb/trunk/data/themes/default/groups/button.edc index d3af61cc..72cf9ff2 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/button.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/button.edc @@ -31,6 +31,7 @@ group { name: "button_clip"; type: RECT; mouse_events: 1; + scale: 1; description { state: "default" 0.0; @@ -54,6 +55,7 @@ group { name: "focus_clip"; type: RECT; mouse_events: 1; + scale: 1; description { state: "default" 0.0; @@ -209,6 +211,7 @@ group { type: RECT; mouse_events: 1; clip_to: "button_clip"; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/capacity.edc b/experimental/ecdb/trunk/data/themes/default/groups/capacity.edc index 4bd4583a..8513d905 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/capacity.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/capacity.edc @@ -18,6 +18,7 @@ group { name: "confine"; mouse_events: 0; type: RECT; + scale: 1; description { state: "default" 0.0; @@ -104,6 +105,7 @@ group { name: "draggie"; type: RECT; clip_to: "confine"; + scale: 1; dragable { confine: "confine"; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/check.edc b/experimental/ecdb/trunk/data/themes/default/groups/check.edc index 0596ac90..b6134b26 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/check.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/check.edc @@ -59,6 +59,7 @@ group { part { name: "check_shadow"; type: IMAGE; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/combo.edc b/experimental/ecdb/trunk/data/themes/default/groups/combo.edc index 64ef2af3..bef45d5e 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/combo.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/combo.edc @@ -10,7 +10,6 @@ group { description { state: "default" 0.0; color: 0 0 0 0; - min: 20 20; rel1 { relative: 0.0 0.0; @@ -85,6 +84,7 @@ group { name: "focus_clip"; type: RECT; mouse_events: 0; + scale: 1; description { state: "default" 0.0; @@ -250,6 +250,7 @@ group { part { name: "ecdb.header.swallow"; type: SWALLOW; + scale: 1; description { state: "default" 0.0; @@ -388,6 +389,7 @@ group { part { name: "ecdb.box"; type: BOX; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/config_inwin.edc b/experimental/ecdb/trunk/data/themes/default/groups/config_inwin.edc index 928bb89f..c41c0e8d 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/config_inwin.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/config_inwin.edc @@ -10,7 +10,6 @@ group { description { state: "default" 0.0; color: 0 0 0 0; - min: 20 20; rel1 { relative: 0.0 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc b/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc index d41d6bc3..21719890 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/erase_disc.edc @@ -74,6 +74,7 @@ group { name: "ecdb/erase/return"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -96,6 +97,7 @@ group { name: "ecdb/erase/begin"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -118,6 +120,7 @@ group { name: "ecdb/erase/speed"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -140,6 +143,7 @@ group { name: "ecdb/erase/drive"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -264,6 +268,7 @@ group { name: "disabled_hack"; type: RECT; mouse_events: 1; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/welcome_page.edc b/experimental/ecdb/trunk/data/themes/default/groups/welcome_page.edc index 05c75029..7d5ad89a 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/welcome_page.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/welcome_page.edc @@ -1,16 +1,17 @@ /* vim: set sw=3 ts=3 sts=3 expandtab: */ group { name: "ecdb/welcome_page"; - min: 640 170; parts { part { name: "bg"; type: RECT; + scale: 1; description { state: "default" 0.0; color: 0 0 0 0; + min: 640 170; rel1 { relative: 0.0 0.0; @@ -58,6 +59,7 @@ group { name: "ecdb/burn_data"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -80,6 +82,7 @@ group { name: "ecdb/burn_audio"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -102,6 +105,7 @@ group { name: "ecdb/burn_image"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -124,6 +128,7 @@ group { name: "ecdb/erase"; type: SWALLOW; repeat_events: 1; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/data/themes/default/groups/window.edc b/experimental/ecdb/trunk/data/themes/default/groups/window.edc index 9609ca88..b8fcae75 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/window.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/window.edc @@ -7,6 +7,7 @@ group { part { name: "background"; mouse_events: 0; + scale: 1; description { state: "default" 0.0; @@ -32,6 +33,7 @@ group { part { name: "paned_container"; type: RECT; + scale: 1; description { state: "default" 0.0; @@ -70,6 +72,7 @@ group { part { name: "paned_draggie"; type: RECT; + scale: 1; dragable { confine: "paned_container"; @@ -102,6 +105,7 @@ group { name: "paned_image"; repeat_events: 1; type: IMAGE; + scale: 1; description { state: "default" 0.0; @@ -130,6 +134,7 @@ group { part { name: "filelist_clip"; type: RECT; + scale: 1; description { state: "default" 0.0; @@ -156,6 +161,7 @@ group { name: "filelist_container"; type: IMAGE; clip_to: "filelist_clip"; + scale: 1; description { state: "default" 0.0; @@ -187,6 +193,7 @@ group { name: "filelist"; type: SWALLOW; clip_to: "filelist_clip"; + scale: 1; description { state: "default" 0.0; @@ -209,6 +216,7 @@ group { clip_to: "filelist_clip"; mouse_events: 1; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -242,6 +250,7 @@ group { clip_to: "filelist_clip"; mouse_events: 1; repeat_events: 1; + scale: 1; description { state: "default" 0.0; @@ -278,6 +287,7 @@ group { type: SWALLOW; mouse_events: 1; repeat_events: 1; + scale: 1; description { state: "default" 0.0; diff --git a/experimental/ecdb/trunk/src/ecdb_gui.c b/experimental/ecdb/trunk/src/ecdb_gui.c index fba007d3..a5ca4437 100644 --- a/experimental/ecdb/trunk/src/ecdb_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_gui.c @@ -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); diff --git a/experimental/ecdb/trunk/src/ecdb_widgets.c b/experimental/ecdb/trunk/src/ecdb_widgets.c index 08afbdec..c7977926 100644 --- a/experimental/ecdb/trunk/src/ecdb_widgets.c +++ b/experimental/ecdb/trunk/src/ecdb_widgets.c @@ -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 {