[NUI] Fix button bugs and improve switch.
authorJiyun Yang <ji.yang@samsung.com>
Fri, 17 Feb 2023 08:51:57 +0000 (17:51 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Tue, 21 Feb 2023 11:04:00 +0000 (20:04 +0900)
commit41db2c5eedb4530e0f43f7211357ef87afcd6677
tree59639c6fb7e864dd43bf32de1fa484c34b56fc82
parent00a97909fcfe1e7a586035cb1c838cd6e033a862
[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