From 2719fe65ee29868c10ec1fd58de86db9daba81d4 Mon Sep 17 00:00:00 2001 From: zhouleonlei <56956725+zhouleonlei@users.noreply.github.com> Date: Tue, 16 Jun 2020 18:00:32 +0800 Subject: [PATCH] [NUI] Remove deprecated APIs in Slider and Switch (#1716) --- src/Tizen.NUI.Components/Controls/Slider.cs | 69 +--------------------- src/Tizen.NUI.Components/Controls/Switch.cs | 21 ------- .../Tizen.NUI.Samples/Samples/SliderSample.cs | 8 +-- 3 files changed, 7 insertions(+), 91 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Slider.cs b/src/Tizen.NUI.Components/Controls/Slider.cs index 2ead05f..ea530cf 100755 --- a/src/Tizen.NUI.Components/Controls/Slider.cs +++ b/src/Tizen.NUI.Components/Controls/Slider.cs @@ -132,21 +132,7 @@ namespace Tizen.NUI.Components var instance = (Slider)bindable; return instance.privateTrackThickness; }); - /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty TrackPaddingProperty = BindableProperty.Create(nameof(TrackPadding), typeof(Extents), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) => - { - var instance = (Slider)bindable; - if (newValue != null) - { - instance.privateTrackPadding.CopyFrom((Extents)newValue); - } - }, - defaultValueCreator: (bindable) => - { - var instance = (Slider)bindable; - return instance.privateTrackPadding; - }); + static Slider() { } /// @@ -271,38 +257,6 @@ namespace Tizen.NUI.Components public new SliderStyle Style => ViewStyle as SliderStyle; /// - /// Get or set low indicator text. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public TextLabel LowIndicatorText - { - get - { - return CreateLowIndicatorText(); - } - internal set - { - lowIndicatorText = value; - } - } - - /// - /// Get or set high indicator text. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public TextLabel HighIndicatorText - { - get - { - return CreateHighIndicatorText(); - } - internal set - { - highIndicatorText = value; - } - } - - /// /// Gets or sets the direction type of slider. /// /// 6 @@ -690,32 +644,15 @@ namespace Tizen.NUI.Components { get { - return TrackPadding.Start; + return privateTrackPadding.Start; } set { ushort val = (ushort)value; - TrackPadding = new Extents(val, val, val, val); + privateTrackPadding = new Extents(val, val, val, val); } } - /// - /// Gets or sets the value of the space between track and indicator. - /// - /// 6 - /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public Extents TrackPadding - { - get - { - return (Extents)GetValue(TrackPaddingProperty); - } - set - { - SetValue(TrackPaddingProperty, value); - } - } private Extents privateTrackPadding { get diff --git a/src/Tizen.NUI.Components/Controls/Switch.cs b/src/Tizen.NUI.Components/Controls/Switch.cs index 3591d17..3d89015 100755 --- a/src/Tizen.NUI.Components/Controls/Switch.cs +++ b/src/Tizen.NUI.Components/Controls/Switch.cs @@ -168,27 +168,6 @@ namespace Tizen.NUI.Components } /// - /// Switch's track part. - /// - /// 6 - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public string SwitchBackgroundImageURL - { - get - { - return Style?.Track?.ResourceUrl?.All; - } - set - { - if (null != value && null != Style?.Track) - { - Style.Track.ResourceUrl = value; - } - } - } - - /// /// Background image's resource url selector in Switch. /// /// 6 diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SliderSample.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SliderSample.cs index fbd5e94..1001a5d 100755 --- a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SliderSample.cs +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SliderSample.cs @@ -39,11 +39,11 @@ namespace Tizen.NUI.Samples // Null style construction slider_null_style[0] = CreateByProperty(800, 50, 20, Slider.DirectionType.Horizontal); slider_null_style[1] = CreateByProperty(800, 50, 30, Slider.DirectionType.Horizontal); - slider_null_style[1].LowIndicatorText.Text = "SubText"; + slider_null_style[1].LowIndicatorTextContent = "SubText"; slider_null_style[1].LowIndicatorSize = new Size(100, 40); slider_null_style[2] = CreateByProperty(50, 400, 20, Slider.DirectionType.Vertical); slider_null_style[3] = CreateByProperty(50, 400, 30, Slider.DirectionType.Vertical); - slider_null_style[3].LowIndicatorText.Text = "SubText"; + slider_null_style[3].LowIndicatorTextContent = "SubText"; slider_null_style[3].LowIndicatorSize = new Size(100, 40); // Style construction @@ -83,11 +83,11 @@ namespace Tizen.NUI.Samples }; slider_style[0] = CreateByStyle(st, 800, 50, 20, Slider.DirectionType.Horizontal); slider_style[1] = CreateByStyle(st, 800, 50, 30, Slider.DirectionType.Horizontal); - slider_style[1].LowIndicatorText.Text = "SubText"; + slider_style[1].LowIndicatorTextContent = "SubText"; slider_style[1].LowIndicatorSize = new Size(100, 40); slider_style[2] = CreateByStyle(st, 50, 400, 20, Slider.DirectionType.Vertical); slider_style[3] = CreateByStyle(st, 50, 400, 30, Slider.DirectionType.Vertical); - slider_style[3].LowIndicatorText.Text = "SubText"; + slider_style[3].LowIndicatorTextContent = "SubText"; slider_style[3].LowIndicatorSize = new Size(100, 40); } -- 2.7.4