raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=7a3a81b144b6ef1b5ce54df01c1e0829395c956a

commit 7a3a81b144b6ef1b5ce54df01c1e0829395c956a
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Feb 5 23:21:02 2014 +0900

    bgpreview - fix sizing to not overrun bounds - fixes wallpaper in pager16
---
 src/bin/e_widget_bgpreview.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_widget_bgpreview.c b/src/bin/e_widget_bgpreview.c
index 9274b86..9aed0b0 100644
--- a/src/bin/e_widget_bgpreview.c
+++ b/src/bin/e_widget_bgpreview.c
@@ -127,9 +127,19 @@ _e_wid_livethumb_resize_job(void *data)
    zone = e_comp_object_util_zone_get(dd->live);
    if (!zone) zone = eina_list_data_get(e_comp_get(NULL)->zones);
    evas_object_geometry_get(dd->live, NULL, NULL, &w, &h);
-   w *= ((float)w / (float)zone->w);
-   h *= ((float)h / (float)zone->h);
-   e_livethumb_vsize_set(dd->live, MAX(w, 64), MAX(h, 64));
+   w *= 2;
+   h *= 2;
+   if (w > 128)
+     {
+        w = 128;
+        h = (zone->h * w) / zone->w;
+     }
+   if (h > 128)
+     {
+        h = 128;
+        w = (zone->w * h) / zone->h;
+     }
+   e_livethumb_vsize_set(dd->live, w, h);
    dd->resize_job = NULL;
 }
 

-- 


Reply via email to