[NUI] Fix button bugs and improve switch.
authorJiyun Yang <ji.yang@samsung.com>
Fri, 17 Feb 2023 08:51:57 +0000 (17:51 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Mon, 20 Feb 2023 08:47:22 +0000 (17:47 +0900)
commit7a4170410f4a04ffb0b9e3a4193a40f5e6028a31
tree4f3151c2323f63913e85732637b3ea147a87d946
parente919ef48147c000c7b6e5117f6b3503d38a0c0e2
[NUI] Fix button bugs and improve switch.

* Button's IconOrientation bug
In the previous code, when the IconOrientation property changed,
the LayoutItems() was called and it created a new layout.
But in case the button was inside another layout, the behaviour
described above caused unexpect look. Therefore I fixed it
by changing orientation related properties to the existing layout
instead of creating a new layout.

* Improve switch and extension relationship
The switch extension does not register any event handler to the switch components anymore.

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI.Components/Controls/Button.Internal.cs
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/Extension/SlidingSwitchExtension.cs
src/Tizen.NUI.Components/Controls/Extension/SwitchExtension.cs
src/Tizen.NUI.Components/Controls/Switch.cs