Toolbar: Fixed wrong toolbar resize logic
authorHosang Kim <hosang12.kim@samsung.com>
Wed, 25 Jun 2014 02:27:08 +0000 (11:27 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 25 Jun 2014 02:27:08 +0000 (11:27 +0900)
Summary: When toolbar use ELM_TOOLBAR_SHRINK_SCROLL and toolbar viewport size is decreased rapidly, toolbar box size is not changed.

Test Plan:
elementary_test -> toolbar 2

increase window size -> decrease window size(presto) -> toolbar size is wrong

Reviewers: seoz, woohyun, jaehwan, Hermet, raster

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D1081

src/lib/elm_toolbar.c

index de4f7e1..55ec9f8 100644 (file)
@@ -537,13 +537,9 @@ _resize_job(void *data)
    else
      {
         if (sd->vertical)
-          {
-             if ((vh >= mh) && (h != vh)) h = vh;
-          }
+          h = (vh >= mh) ? vh : mh;
         else
-          {
-             if ((vw >= mw) && (w != vw)) w = vw;
-          }
+          w = (vw >= mw) ? vw : mw;
         EINA_INLIST_FOREACH(sd->items, it)
           {
              if (it->selected)