add radiobutton list item to display theme gadget
authorYurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics <y.zinchuk@samsung.com>
Fri, 31 Mar 2023 09:48:14 +0000 (11:48 +0200)
committerMarcin Romaniuk/Tizen Services & IoT (PLT) /SRPOL/Senior Designer/Samsung Electronics <m.romaniuk@samsung.com>
Mon, 3 Apr 2023 12:16:56 +0000 (14:16 +0200)
SettingMainGadget/Display/DisplayThemeGadget.cs

index 92ceb4be0b4c475b645045e0b416a6002b9a529b..43bdaf23ce06b2b9d84dd7cce2fb4847d4e0d324 100644 (file)
@@ -1,4 +1,5 @@
 using SettingCore.TextResources;
+using SettingCore.Views;
 using SettingMainGadget.Display;
 using System.Linq;
 using Tizen.NUI;
@@ -31,16 +32,11 @@ namespace Setting.Menu.Display
 
             for (int i = 0; i < themeList.Count; i++)
             {
-                RadioButton radioButton = new RadioButton()
-                {
-                    ThemeChangeSensitive = true,
-                    Text = themeList[i],
-                    IsSelected = i.Equals(DisplayThemeManager.GetThemeIndex()),
-                    Margin = new Extents(24, 0, 0, 0).SpToPx(),
-                };
-
-                radioButtonGroup.Add(radioButton);
-                content.Add(radioButton);
+                RadioButtonListItem item = new RadioButtonListItem(themeList[i]);
+                item.RadioButton.IsSelected = i.Equals(DisplayThemeManager.GetThemeIndex());
+
+                radioButtonGroup.Add(item.RadioButton);
+                content.Add(item);
             }
 
             radioButtonGroup.SelectedChanged += (o, e) =>