From: Yurii Zinchuk/Tizen Services & IoT (PLT) /SRPOL/Engineer/Samsung Electronics Date: Fri, 31 Mar 2023 09:48:14 +0000 (+0200) Subject: add radiobutton list item to display theme gadget X-Git-Tag: accepted/tizen/unified/20230405.153339~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7c128b422e5f51cd905481ce0eee9668c5fd2b5;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsettings.git add radiobutton list item to display theme gadget --- diff --git a/SettingMainGadget/Display/DisplayThemeGadget.cs b/SettingMainGadget/Display/DisplayThemeGadget.cs index 92ceb4b..43bdaf2 100644 --- a/SettingMainGadget/Display/DisplayThemeGadget.cs +++ b/SettingMainGadget/Display/DisplayThemeGadget.cs @@ -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) =>