From: Seoyeon Kim Date: Wed, 8 Jun 2022 05:37:59 +0000 (+0900) Subject: [NUI] Fix to invoke ValueChanged event when changing the value to Key X-Git-Tag: accepted/tizen/unified/20231205.024657~906 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01c4198c72e4ab63522f6bb5f64a09fb7ec7330a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix to invoke ValueChanged event when changing the value to Key - Until now, `ValueChanged` event emits on Touch / Mouse moving. - Update to invoke the event when the thumb moves with not only touch event but also key event. Signed-off-by: Seoyeon Kim --- diff --git a/src/Tizen.NUI.Components/Controls/Slider.cs b/src/Tizen.NUI.Components/Controls/Slider.cs index c2c3ee7..13aea98 100755 --- a/src/Tizen.NUI.Components/Controls/Slider.cs +++ b/src/Tizen.NUI.Components/Controls/Slider.cs @@ -1435,6 +1435,7 @@ namespace Tizen.NUI.Components recoverIndicator = FocusManager.Instance.FocusIndicator; FocusManager.Instance.FocusIndicator = editModeIndicator; } + UpdateState(true, isPressed); return true; } @@ -1466,6 +1467,9 @@ namespace Tizen.NUI.Components { CurrentValue -= 1; } + sliderValueChangedHandler?.Invoke(this, new SliderValueChangedEventArgs { + CurrentValue = curValue + }); } return true; // Consumed } @@ -1487,6 +1491,9 @@ namespace Tizen.NUI.Components { CurrentValue += 1; } + sliderValueChangedHandler?.Invoke(this, new SliderValueChangedEventArgs { + CurrentValue = curValue + }); } return true; // Consumed } @@ -1771,6 +1778,11 @@ namespace Tizen.NUI.Components return false; } + if (this.FocusableInTouch == false && editMode == false) + { + isFocused = false; + } + PointStateType state = e.Touch.GetState(0); if (state == PointStateType.Down) { @@ -1807,6 +1819,11 @@ namespace Tizen.NUI.Components private bool OnTouchEventForThumb(object source, TouchEventArgs e) { + if (this.FocusableInTouch == false && editMode == false) + { + isFocused = false; + } + PointStateType state = e.Touch.GetState(0); if (state == PointStateType.Down) {