[NUI] Fix TabButton's size calculation logic with the latest UX
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 4 May 2022 06:26:27 +0000 (15:26 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Tue, 10 May 2022 06:09:58 +0000 (15:09 +0900)
commit0a9d626c9f146d33f7319053538f5711c80f2f50
treea053ddbe155189a907b561b1c3161ebd5be76dd8
parent5c802f684dee8031d8eb3546fc1c8c49a9683153
[NUI] Fix TabButton's size calculation logic with the latest UX

Based on the latest UX, TabButton's sub components' sizes are different
when Text/IconURL is set and when Text/IconURL is not set.

Therefore, TextButton's sub components' sizes should be updated when
Text/IconURL is set.

If sub components' sizes are updated in OnRelayout() like previous
calculation logic, then the sizes cannot be applied by NUI Layout.

The reason is as follows.
- Changing subcomponents' sizes calls NUI Layout's RequestLayout().
- NUI Layout's RequestLayout() calls Awake() to awake idling DALi main
  loop.
- DALi main loop calls NUI Layout's Process() and then calls DALi
  Relayout().
- NUI Layout's Process() applies changed sizes by NUI Layout.

Consequently, if NUI Layout's RequestLayout() is called in OnRelayout(),
then DALi main loop is finished without calling NUI Layout's Process()
again.

As a result, to resolve the above problem, TabButton's sub components'
sizes are updated when Text/IconURL is set.

Related samples are also updated.
13 files changed:
src/Tizen.NUI.Components/Controls/TabButton.cs
src/Tizen.NUI.Components/Style/TabButtonStyle.cs
src/Tizen.NUI.Components/Theme/DefaultThemeCommon.cs
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconOnlyTest.cs [new file with mode: 0644]
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconOnlyTestPage.xaml [new file with mode: 0755]
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconOnlyTestPage.xaml.cs [new file with mode: 0755]
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconTest.cs [new file with mode: 0644]
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconTestPage.xaml [new file with mode: 0755]
test/NUITizenGallery/Examples/TabViewTest/TabViewWithIconTestPage.xaml.cs [new file with mode: 0755]
test/NUITizenGallery/res/home.png [new file with mode: 0644]
test/Tizen.NUI.StyleGuide/Examples/TabViewWithIconExample.cs [new file with mode: 0644]
test/Tizen.NUI.StyleGuide/Examples/TabViewWithIconOnlyExample.cs [new file with mode: 0644]
test/Tizen.NUI.StyleGuide/res/home.png [new file with mode: 0644]