summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <m.blumenkran@samsung.com>2013-07-26 12:50:28 +0100
committerMike Blumenkrantz <m.blumenkran@samsung.com>2013-07-26 12:52:57 +0100
commitd236e2acece07d7dc611cc7ef1f52e77ceaac922 (patch)
tree634b2220f9bb66c9c900de559e703d6d115be246
parent0923848dc1287fdd28624452d6ab33942a037f15 (diff)
downloadenlightenment-d236e2acece07d7dc611cc7ef1f52e77ceaac922.tar.gz
bugfix: fileman double click auto-resizing now accounts for toolbar/sidebar and accounts for maximized state
T208
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/modules/fileman/e_fwin.c10
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ce5f52e5f9..b8a07e70b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-26 Mike Blumenkrantz
+
+ * fixed bug where double clicking filemanager windows would not correctly autosize
+
2013-06-20 Mike Blumenkrantz
* udisks2 support
diff --git a/NEWS b/NEWS
index 8e51d7e983..259e9214cd 100644
--- a/NEWS
+++ b/NEWS
@@ -226,3 +226,4 @@ Fixes:
* fixed bug where e widgets would not unset focus
* fixed bug with filemanager setting path with too many spaces when opened from menu
* fixed crash when multiple windows shared a remember
+ * fixed bug where double clicking filemanager windows would not correctly autosize
diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c
index c823810cf7..438ef0d35c 100644
--- a/src/modules/fileman/e_fwin.c
+++ b/src/modules/fileman/e_fwin.c
@@ -624,15 +624,21 @@ e_fwin_zone_find(E_Zone *zone)
static void
_e_fwin_bg_mouse_down(E_Fwin *fwin, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
- int x, y, w, h, zx, zy, zw, zh;
+ int x, y, w, h, zx, zy, zw, zh, cx, cy, cw, ch;
+
+ if (fwin->win->border->maximized) e_border_unmaximize(fwin->win->border, fwin->win->border->maximized);
+ if (fwin->win->border->fullscreen) e_border_unfullscreen(fwin->win->border);
e_zone_useful_geometry_get(fwin->win->border->zone, &zx, &zy, &zw, &zh);
x = fwin->win->border->x, y = fwin->win->border->y;
if (!e_fm2_optimal_size_calc(fwin->cur_page->fm_obj, zw - x, zh - y, &w, &h)) return;
+ evas_object_geometry_get(fwin->cur_page->fm_obj, &cx, &cy, &cw, &ch);
if (x + w > zx + zw)
w = zx + zw - x;
if (y + x > zy + zh)
h = zy + zh - y;
- e_win_resize(fwin->win, w, h);
+ w = w + cx;
+ h = h + cx;
+ e_win_resize(fwin->win, MAX(w, 360), MAX(h, 250));
}
static E_Fwin *