elm_hoversel: Fix spacer size calculation 77/247777/1
authorJunsuChoi <jsuya.choi@samsung.com>
Mon, 16 Nov 2020 10:02:23 +0000 (19:02 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Mon, 16 Nov 2020 10:03:39 +0000 (19:03 +0900)
If right side(top-right) of spacer is larger than
parent, change align of spacer.
Then spacer is readjusted only
if hoversel on the left area is smaller than spacer.

Change-Id: I6e6ae3bb22686c9b679b087e5a97f63666a24e78

src/lib/elementary/elc_hoversel.c

index d1c8fd7..4e1ae23 100644 (file)
@@ -387,7 +387,12 @@ _sizing_eval(void *data)
                   else
                     elm_object_signal_emit(sd->hover, "elm,state,align,right", "elm");
 
-                  adjusted.w = (parent.x + parent.w) - adjusted.x;
+                  // TIZEN_ONLY(20201116): elm_hoversel: Fix spacer size calculation
+                  // NOTE: Resize spacer(adjusted) only when left area of spacer is
+                  //       smaller than size of spacer.
+                  if ((adjusted.x + adjusted.w) - parent.x < adjusted.x)
+                  //
+                    adjusted.w = (parent.x + parent.w) - adjusted.x;
                }
           }
      }