From af514f159f565cb80afb87bf8332aca3cbb35655 Mon Sep 17 00:00:00 2001 From: ANZ1217 Date: Fri, 10 May 2024 19:37:33 +0900 Subject: [PATCH] Fixed the problem that Rrefactoring was not applied --- .../src/public/BaseComponents/TextEditor.cs | 40 ++++++++++++-- .../BaseComponents/TextEditorBindableProperty.cs | 23 ++++---- .../src/public/BaseComponents/TextField.cs | 42 +++++++++++++-- .../BaseComponents/TextFieldBindableProperty.cs | 21 +++++--- .../src/public/BaseComponents/TextLabel.cs | 63 +++++++++++++++++++--- .../BaseComponents/TextLabelBindableProperty.cs | 27 +++++----- 6 files changed, 173 insertions(+), 43 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 3cc36b5..e1b854c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -202,6 +202,10 @@ namespace Tizen.NUI.BaseComponents PrimaryCursorPositionProperty = BindableProperty.Create(nameof(PrimaryCursorPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: SetInternalPrimaryCursorPositionProperty, defaultValueCreator: GetInternalPrimaryCursorPositionProperty); CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: SetInternalCharacterSpacingProperty, defaultValueCreator: GetInternalCharacterSpacingProperty); + + RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextEditor), 0.0f, propertyChanged: SetInternalRemoveFrontInsetProperty, defaultValueCreator: GetInternalRemoveFrontInsetProperty); + + RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextEditor), 0.0f, propertyChanged: SetInternalRemoveBackInsetProperty, defaultValueCreator: GetInternalRemoveBackInsetProperty); } } @@ -3664,11 +3668,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveFrontInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveFrontInsetProperty); + } + else + { + return (bool)GetInternalRemoveFrontInsetProperty(this); + } } set { - SetValue(RemoveFrontInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveFrontInsetProperty, value); + } + else + { + SetInternalRemoveFrontInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } @@ -3685,11 +3703,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveBackInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveBackInsetProperty); + } + else + { + return (bool)GetInternalRemoveBackInsetProperty(this); + } } set { - SetValue(RemoveBackInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveBackInsetProperty, value); + } + else + { + SetInternalRemoveBackInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditorBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditorBindableProperty.cs index 1a39ac2..24b5500 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditorBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditorBindableProperty.cs @@ -1572,40 +1572,45 @@ namespace Tizen.NUI.BaseComponents return Object.InternalGetPropertyFloat(textEditor.SwigCPtr, TextEditor.Property.CharacterSpacing); } - /// + /// /// RemoveFrontInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextEditor), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveFrontInsetProperty = null; + internal static void SetInternalRemoveFrontInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textEditor = (TextEditor)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textEditor.SwigCPtr, TextEditor.Property.RemoveFrontInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + internal static object GetInternalRemoveFrontInsetProperty(BindableObject bindable) { var textEditor = (TextEditor)bindable; + return Object.InternalGetPropertyBool(textEditor.SwigCPtr, TextEditor.Property.RemoveFrontInset); - })); + } /// /// RemoveBackInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextEditor), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveBackInsetProperty = null; + internal static void SetInternalRemoveBackInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textEditor = (TextEditor)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textEditor.SwigCPtr, TextEditor.Property.RemoveBackInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + + internal static object GetInternalRemoveBackInsetProperty(BindableObject bindable) { var textEditor = (TextEditor)bindable; + return Object.InternalGetPropertyBool(textEditor.SwigCPtr, TextEditor.Property.RemoveBackInset); - })); + } } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 75865f3..4c19ddd 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -256,6 +256,12 @@ namespace Tizen.NUI.BaseComponents CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextField), default(float), propertyChanged: SetInternalCharacterSpacingProperty, defaultValueCreator: GetInternalCharacterSpacingProperty); + + RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextField), 0.0f, + propertyChanged: SetInternalRemoveFrontInsetProperty, defaultValueCreator: GetInternalRemoveFrontInsetProperty); + + RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextField), 0.0f, + propertyChanged: SetInternalRemoveBackInsetProperty, defaultValueCreator: GetInternalRemoveBackInsetProperty); } } @@ -3629,11 +3635,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveFrontInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveFrontInsetProperty); + } + else + { + return (bool)GetInternalRemoveFrontInsetProperty(this); + } } set { - SetValue(RemoveFrontInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveFrontInsetProperty, value); + } + else + { + SetInternalRemoveFrontInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } @@ -3650,11 +3670,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveBackInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveBackInsetProperty); + } + else + { + return (bool)GetInternalRemoveBackInsetProperty(this); + } } set { - SetValue(RemoveBackInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveBackInsetProperty, value); + } + else + { + SetInternalRemoveBackInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs index ef74710..6318aba 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs @@ -1318,36 +1318,41 @@ namespace Tizen.NUI.BaseComponents /// RemoveFrontInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextField), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveFrontInsetProperty = null; + internal static void SetInternalRemoveFrontInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textField = (TextField)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveFrontInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + internal static object GetInternalRemoveFrontInsetProperty(BindableObject bindable) { var textField = (TextField)bindable; + return Object.InternalGetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveFrontInset); - })); + } /// /// RemoveBackInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextField), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveBackInsetProperty = null; + internal static void SetInternalRemoveBackInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textField = (TextField)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveBackInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + + internal static object GetInternalRemoveBackInsetProperty(BindableObject bindable) { var textField = (TextField)bindable; + return Object.InternalGetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveBackInset); - })); + } } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index cfd872f..1c0c532 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -208,6 +208,15 @@ namespace Tizen.NUI.BaseComponents UnderlineHeightProperty = BindableProperty.Create(nameof(UnderlineHeight), typeof(float), typeof(TextLabel), 0.0f, propertyChanged: SetInternalUnderlineHeightProperty, defaultValueCreator: GetInternalUnderlineHeightProperty); + + RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextLabel), 0.0f, + propertyChanged: SetInternalRemoveFrontInsetProperty, defaultValueCreator: GetInternalRemoveFrontInsetProperty); + + RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextLabel), 0.0f, + propertyChanged: SetInternalRemoveBackInsetProperty, defaultValueCreator: GetInternalRemoveBackInsetProperty); + + CutoutProperty = BindableProperty.Create(nameof(Cutout), typeof(bool), typeof(TextLabel), 0.0f, + propertyChanged: SetInternalCutoutProperty, defaultValueCreator: GetInternalCutoutProperty); } } @@ -2285,11 +2294,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveFrontInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveFrontInsetProperty); + } + else + { + return (bool)GetInternalRemoveFrontInsetProperty(this); + } } set { - SetValue(RemoveFrontInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveFrontInsetProperty, value); + } + else + { + SetInternalRemoveFrontInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } @@ -2306,11 +2329,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(RemoveBackInsetProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(RemoveBackInsetProperty); + } + else + { + return (bool)GetInternalRemoveBackInsetProperty(this); + } } set { - SetValue(RemoveBackInsetProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(RemoveBackInsetProperty, value); + } + else + { + SetInternalRemoveBackInsetProperty(this, null, value); + } NotifyPropertyChanged(); } } @@ -2436,11 +2473,25 @@ namespace Tizen.NUI.BaseComponents { get { - return (bool)GetValue(CutoutProperty); + if (NUIApplication.IsUsingXaml) + { + return (bool)GetValue(CutoutProperty); + } + else + { + return (bool)GetInternalCutoutProperty(this); + } } set { - SetValue(CutoutProperty, value); + if (NUIApplication.IsUsingXaml) + { + SetValue(CutoutProperty, value); + } + else + { + SetInternalCutoutProperty(this, null, value); + } NotifyPropertyChanged(); } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs index 1a0842e..7fa4090 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs @@ -316,39 +316,41 @@ namespace Tizen.NUI.BaseComponents /// RemoveFrontInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveFrontInsetProperty = null; + internal static void SetInternalRemoveFrontInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textLabel = (TextLabel)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.RemoveFrontInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + internal static object GetInternalRemoveFrontInsetProperty(BindableObject bindable) { var textLabel = (TextLabel)bindable; return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.RemoveFrontInset); - })); + } /// /// RemoveBackInsetProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty RemoveBackInsetProperty = null; + internal static void SetInternalRemoveBackInsetProperty(BindableObject bindable, object oldValue, object newValue) { var textLabel = (TextLabel)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.RemoveBackInset, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + internal static object GetInternalRemoveBackInsetProperty(BindableObject bindable) { var textLabel = (TextLabel)bindable; return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.RemoveBackInset); - })); + } /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] @@ -935,20 +937,21 @@ namespace Tizen.NUI.BaseComponents /// CutoutProperty /// [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty CutoutProperty = BindableProperty.Create(nameof(Cutout), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) => + public static readonly BindableProperty CutoutProperty = null; + internal static void SetInternalCutoutProperty(BindableObject bindable, object oldValue, object newValue) { var textLabel = (TextLabel)bindable; if (newValue != null) { Object.InternalSetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.Cutout, (bool)newValue); } - }), - defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) => + } + internal static object GetInternalCutoutProperty(BindableObject bindable) { var textLabel = (TextLabel)bindable; return Object.InternalGetPropertyBool(textLabel.SwigCPtr, TextLabel.Property.Cutout); - })); + } internal Selector TranslatableTextSelector { -- 2.7.4