Use predefined SpeechRateRow control 59/302859/1 accepted/tizen_unified_riscv accepted/tizen/unified/20231219.041305 accepted/tizen/unified/riscv/20231226.211749
authorPiotr Czaja <p.czaja@samsung.com>
Thu, 14 Dec 2023 12:53:16 +0000 (13:53 +0100)
committerPiotr Czaja <p.czaja@samsung.com>
Thu, 14 Dec 2023 12:53:48 +0000 (13:53 +0100)
Change-Id: I44af69d8fdf46c80681e7327b9af7fee9ba09103
Signed-off-by: Piotr Czaja <p.czaja@samsung.com>
SettingAccessibility/SettingAccessibility/SettingAccessibility.cs
SettingAccessibility/SettingAccessibility/SettingAccessibility.csproj
SettingAccessibility/SettingAccessibility/SpeechRateRow.cs [deleted file]
SettingAccessibility/SettingAccessibility/TextResources/Resources.Designer.cs [new file with mode: 0644]
SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/running-icon.svg [deleted file]
SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/walking-icon.svg [deleted file]
packaging/org.tizen.cssetting-accessibility-1.1.0.rpk

index b1613e90e136939a5a2a8ce69747ed70cf2dbfb8..937d6e8c30d8f7affc60cc0bc1564c4e26171ae4 100644 (file)
@@ -4,6 +4,7 @@ using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
 using SettingAccessibility.TextResources;
 using Tizen.Uix.Tts;
+using SettingCore.Views;
 
 namespace SettingAccessibility
 {
@@ -112,7 +113,7 @@ namespace SettingAccessibility
             volume.IsEnabled = false;
             sections.Add(volume);
 
-            var speechRate = new SpeechRateRow(NUIGadgetResourceManager.GetString(nameof(Resources.IDS_ST_TTS_SPEECH_RATE)), GetResourcePath("walking-icon.svg"), GetResourcePath("running-icon.svg"));
+            var speechRate = new SpeechRateRow();
             speechRate.Slider.MinValue = speedRange.Min;
             speechRate.Slider.MaxValue = speedRange.Max;
             // TODO: use actual value from vconf for CurrentValue, instead of speedRange.Normal
index b186239d8160956fcaae248748c5255955443115..93a313bff9d5969016b3a6027f92accc00dd3d25 100644 (file)
@@ -14,8 +14,8 @@
        </PropertyGroup>
 
        <ItemGroup>
-               <PackageReference Include="SettingCore" Version="1.0.384" />
-               <PackageReference Include="Tizen.NET" Version="12.0.0.18057" />
+               <PackageReference Include="SettingCore" Version="1.0.401" />
+               <PackageReference Include="Tizen.NET" Version="12.0.0.18174" />
        </ItemGroup>
 
        <ItemGroup>
diff --git a/SettingAccessibility/SettingAccessibility/SpeechRateRow.cs b/SettingAccessibility/SettingAccessibility/SpeechRateRow.cs
deleted file mode 100644 (file)
index 5a61ebd..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-using SettingCore.Views;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-namespace SettingAccessibility
-{
-    internal class SpeechRateRow : SettingCore.Views.BaseComponent
-    {
-        private readonly ThemeColor TrackColors = new ThemeColor(new Color("#FF6200"), new Color("#FF8A00"), Color.Transparent, Color.Transparent, new Color("#CACACA"), new Color("#CACACA"));
-        private readonly ThemeColor BgTrackColors = new ThemeColor(new Color(1.0f, 0.37f, 0.0f, 0.1f), new Color(1.0f, 0.37f, 0.0f, 0.1f), Color.Transparent, Color.Transparent);
-        private readonly ThemeColor TextColors = new ThemeColor(new Color("#090E21"), new Color("#FDFDFD"), Color.Transparent, Color.Transparent, new Color("#CACACA"), new Color("#666666"));
-
-        private ImageView leftIcon;
-        private ImageView rightIcon;
-        private TextLabel primary;
-
-        public Slider Slider { get; private set; }
-
-        public SpeechRateRow(string primaryText, string leftIconPath, string rightIconPath)
-        {
-            Layout = new LinearLayout()
-            {
-                LinearOrientation = LinearLayout.Orientation.Vertical,
-            };
-
-            primary = new TextLabel
-            {
-                AccessibilityHidden = true,
-                ThemeChangeSensitive = true,
-                Text = primaryText,
-                Margin = new Extents(16, 0, 16, 0).SpToPx(),
-                PixelSize = 24.SpToPx(),
-            };
-
-            var sliderView = new View
-            {
-                WidthSpecification = LayoutParamPolicies.MatchParent,
-                Margin = new Extents(16, 16, 16, 16).SpToPx(),
-                Layout = new LinearLayout()
-                {
-                    LinearOrientation = LinearLayout.Orientation.Horizontal,
-                    VerticalAlignment = VerticalAlignment.Center,
-                },
-            };
-
-            leftIcon = new ImageView(leftIconPath)
-            {
-                Size2D = new Size2D(48, 48).SpToPx(),
-                Margin = new Extents(16, 0, 8, 8).SpToPx(),
-            };
-
-            rightIcon = new ImageView(rightIconPath)
-            {
-                Size2D = new Size2D(48, 48).SpToPx(),
-                Margin = new Extents(0, 16, 8, 8).SpToPx(),
-            };
-
-            Slider = new Slider()
-            {
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-                Direction = Slider.DirectionType.Horizontal,
-                TrackThickness = (uint)8.SpToPx(),
-                ThumbSize = new Size(24, 24).SpToPx(),
-                BgTrackColor = BgTrackColors.Normal,
-                SlidedTrackColor = TrackColors.Normal,
-
-                IsDiscrete = true,
-                DiscreteValue = 1,
-            };
-
-            sliderView.Add(leftIcon);
-            sliderView.Add(Slider);
-            sliderView.Add(rightIcon);
-
-            Add(primary);
-            Add(sliderView);
-
-            ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
-        }
-
-        private void ThemeManager_ThemeChanged(object sender, ThemeChangedEventArgs e)
-        {
-            primary.TextColor = TextColors.Normal;
-
-            Slider.BgTrackColor = BgTrackColors.Normal;
-            Slider.SlidedTrackColor = TrackColors.Normal;
-        }
-
-        protected override string AccessibilityGetName()
-        {
-            return $"{primary.Text}, {(int)(Slider.CurrentValue / Slider.MaxValue * 100)} %";
-        }
-    }
-}
diff --git a/SettingAccessibility/SettingAccessibility/TextResources/Resources.Designer.cs b/SettingAccessibility/SettingAccessibility/TextResources/Resources.Designer.cs
new file mode 100644 (file)
index 0000000..8b10278
--- /dev/null
@@ -0,0 +1,226 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SettingAccessibility.TextResources {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    public class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SettingAccessibility.TextResources.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to While Screen reader is enabled, your phone will provide voice feedback. For example, Screen reader will tell you what you can interact with on each screen. Tap items to select them and hear what they are, and double tap items to perform the telated action. .
+        /// </summary>
+        public static string IDS_ACCS_BODY_WHILE_SCREEN_READER_IS_ENABLED_YOUR_PHONE_WILL_PROVIDE_VOICE_FEEDBACK_FOR_EXAMPLE_SCREEN_READER_WILL_MSG {
+            get {
+                return ResourceManager.GetString("IDS_ACCS_BODY_WHILE_SCREEN_READER_IS_ENABLED_YOUR_PHONE_WILL_PROVIDE_VOICE_FEEDBA" +
+                        "CK_FOR_EXAMPLE_SCREEN_READER_WILL_MSG", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Accessibility.
+        /// </summary>
+        public static string IDS_ST_BODY_ACCESSIBILITY {
+            get {
+                return ResourceManager.GetString("IDS_ST_BODY_ACCESSIBILITY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Talk Back.
+        /// </summary>
+        public static string IDS_ST_HEADER_TALK_BACK {
+            get {
+                return ResourceManager.GetString("IDS_ST_HEADER_TALK_BACK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Screen Reader (TTS).
+        /// </summary>
+        public static string IDS_ST_SCREEN_READER_TTS {
+            get {
+                return ResourceManager.GetString("IDS_ST_SCREEN_READER_TTS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Keyboard feedback.
+        /// </summary>
+        public static string IDS_ST_TTS_KEYBOARD_FEEDBACK {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_KEYBOARD_FEEDBACK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Always read keyboard input aload.
+        /// </summary>
+        public static string IDS_ST_TTS_KEYBOARD_INPUT_ALOAD {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_KEYBOARD_INPUT_ALOAD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Read usage hints aloud.
+        /// </summary>
+        public static string IDS_ST_TTS_READ_USAGE_HINTS_ALOAD {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_READ_USAGE_HINTS_ALOAD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Sound feedback.
+        /// </summary>
+        public static string IDS_ST_TTS_SOUND_FEEDBACK {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_SOUND_FEEDBACK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Speech rate.
+        /// </summary>
+        public static string IDS_ST_TTS_SPEECH_RATE {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_SPEECH_RATE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Status bar information.
+        /// </summary>
+        public static string IDS_ST_TTS_STATUS_BAR_INFO {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_STATUS_BAR_INFO", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Select which information from indicators shown on the status bar will be read aloud when you triple tap the screen with two fingers, for example, the time and date, the device’s signal strength, Wi-Fi and Bluetooth connections, and the battery power..
+        /// </summary>
+        public static string IDS_ST_TTS_STATUS_BAR_INFO_DESCRIPTION {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_STATUS_BAR_INFO_DESCRIPTION", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Vibration feedback.
+        /// </summary>
+        public static string IDS_ST_TTS_VIBRATION_FEEDBACK {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VIBRATION_FEEDBACK", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Auto.
+        /// </summary>
+        public static string IDS_ST_TTS_VOICE_AUTO {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VOICE_AUTO", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Child.
+        /// </summary>
+        public static string IDS_ST_TTS_VOICE_CHILD {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VOICE_CHILD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Female.
+        /// </summary>
+        public static string IDS_ST_TTS_VOICE_FEMALE {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VOICE_FEMALE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Male.
+        /// </summary>
+        public static string IDS_ST_TTS_VOICE_MALE {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VOICE_MALE", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Volume.
+        /// </summary>
+        public static string IDS_ST_TTS_VOICE_VOLUME {
+            get {
+                return ResourceManager.GetString("IDS_ST_TTS_VOICE_VOLUME", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Voice Type &amp; Language.
+        /// </summary>
+        public static string IDS_ST_VOICE_TYPE_AND_LANGUAGE {
+            get {
+                return ResourceManager.GetString("IDS_ST_VOICE_TYPE_AND_LANGUAGE", resourceCulture);
+            }
+        }
+    }
+}
diff --git a/SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/running-icon.svg b/SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/running-icon.svg
deleted file mode 100644 (file)
index 1916618..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="49" height="49" viewBox="0 0 49 49" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M33.8736 18.8771L30.9692 13.4532L25.2769 11.5558L25.2638 11.5963L16.4169 14.1239C15.7911 14.3048 15.2408 14.6837 14.8485 15.2038C14.4562 15.7238 14.243 16.357 14.241 17.0084V24.8771H17.241V17.0085L24.141 15.0372L21.093 24.3778L21.0784 24.3725L18.3162 32.1069C18.1825 32.475 17.9109 32.7768 17.5587 32.9483C17.2066 33.1197 16.8015 33.1475 16.4293 33.0256L10.2154 30.954L9.2666 33.8001L15.4805 35.8713C16.597 36.2434 17.8147 36.1633 18.8728 35.6482C19.9309 35.1332 20.7451 34.2241 21.141 33.1159L23.4127 26.7551L25.0227 27.2801L29.5508 31.8082C29.6908 31.9472 29.8017 32.1126 29.8773 32.2948C29.9529 32.4771 29.9915 32.6725 29.991 32.8697V42.8771H32.991V32.8697C32.9926 32.2785 32.8769 31.6929 32.6506 31.1467C32.4244 30.6005 32.0921 30.1046 31.6729 29.6877L27.1481 25.1629L29.659 17.4682L31.4655 20.7197C31.6604 21.0704 31.9455 21.3626 32.2913 21.5661C32.6371 21.7696 33.031 21.8769 33.4323 21.8771H41.241V18.8771H33.8736ZM27.6311 10.4121C28.2204 10.9045 28.9599 11.1812 29.7277 11.1966C30.4955 11.212 31.2455 10.965 31.854 10.4966C32.4625 10.0282 32.893 9.36623 33.0746 8.62008C33.2561 7.87392 33.1777 7.08818 32.8524 6.39257C32.5271 5.69695 31.9743 5.13308 31.2853 4.79403C30.5963 4.45499 29.8123 4.36105 29.0627 4.52773C28.3131 4.69441 27.6427 5.11174 27.1623 5.71082C26.6819 6.3099 26.4201 7.0549 26.4202 7.82281C26.4193 8.31687 26.5274 8.80505 26.7367 9.25259C26.946 9.70013 27.2514 10.096 27.6311 10.4121Z" fill="#FF6200"/>
-</svg>
diff --git a/SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/walking-icon.svg b/SettingAccessibility/SettingAccessibility/res/allowed/SettingAccessibility/walking-icon.svg
deleted file mode 100644 (file)
index 4f8156b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="49" height="49" viewBox="0 0 49 49" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M29.7973 11.0185C31.5623 11.0185 32.9931 9.58767 32.9931 7.8227C32.9931 6.05774 31.5623 4.62695 29.7973 4.62695C28.0323 4.62695 26.6016 6.05774 26.6016 7.8227C26.6016 9.58767 28.0323 11.0185 29.7973 11.0185Z" fill="#FF6200"/>
-<path d="M30.93 13.5756L25.2501 11.6406L17.9737 14.2868C17.5402 14.4454 17.1658 14.7332 16.901 15.1112C16.6361 15.4893 16.4935 15.9395 16.4925 16.4011V21.8761H19.4925V16.9267L24.0685 15.2627L15.6133 41.3761H18.7645L23.4597 26.7688L24.1976 27.0095L27.7425 33.5085V41.3761H30.7425V33.3173C30.7422 32.9409 30.6477 32.5705 30.4677 32.2398L26.9464 25.7841L29.6604 17.4671L31.467 20.7187C31.6619 21.0694 31.947 21.3616 32.2928 21.5651C32.6386 21.7686 33.0325 21.8759 33.4338 21.8761H38.2425V18.8761H33.875L30.93 13.5756Z" fill="#FF6200"/>
-</svg>
index 440138205ca8525bf7c65391442f4c70f705bf10..179c783274d1c2793408158273dfeeed79140868 100644 (file)
Binary files a/packaging/org.tizen.cssetting-accessibility-1.1.0.rpk and b/packaging/org.tizen.cssetting-accessibility-1.1.0.rpk differ