Fixing wallpaper thumbnail's aspect ratio. 12/296512/1 accepted/tizen/unified/20230731.175330
authortarun.mahay <tarun.mahay@samsung.com>
Mon, 31 Jul 2023 03:54:18 +0000 (09:24 +0530)
committertarun.mahay <tarun.mahay@samsung.com>
Mon, 31 Jul 2023 03:54:18 +0000 (09:24 +0530)
Change-Id: I590cad8c247c123263c8ac52b0355d53b8979826
Signed-off-by: tarun.mahay <tarun.mahay@samsung.com>
SettingWallpaper/SettingWallpaper/Views/WallpaperView.cs
packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk

index 08ce0b54d3ce0ab050c1fb17c7944845dc50b45e..53384591e5be07bc92c1f3b61288b732a301eb66 100644 (file)
@@ -201,11 +201,13 @@ namespace SettingWallpaper.Views
                 else
                 {
                     Button wallpaper = CreateNewButton();
+                    ImageView icon = CreateButtonIcon();
+                    wallpaper.Add(icon);
                     wallpaperListView.Add(wallpaper);
                     Tizen.Log.Info(Resources.LogTag, "Buttons Added");
 
                     wallpaper.BindingContext = item;
-                    wallpaper.SetBinding(BackgroundImageProperty, "ThumbnailUrl");
+                    icon.SetBinding(ResourceUrlProperty, "ThumbnailUrl");
                     wallpaper.SetBinding(Control.CommandProperty, "WallpaperSelectCommand");
                 }
                 index++;
@@ -221,11 +223,23 @@ namespace SettingWallpaper.Views
             }
         }
 
+        private ImageView CreateButtonIcon()
+        {
+            ImageView icon = new ImageView
+            {
+                Size2D = AppCommon.thumbnailSize,
+                FittingMode = FittingModeType.ScaleToFill,
+                CornerRadius = AppCommon.itemCornerRadius,
+                ThemeChangeSensitive = false,
+            };
+            return icon;
+        }
+
         public Button CreateNewButton()
         {
             Button wallpaper = new Button()
             {
-                ThemeChangeSensitive = true,
+                ThemeChangeSensitive = false,
                 Size2D = AppCommon.thumbnailSize,
                 CornerRadius = AppCommon.itemCornerRadius,
                 BackgroundColor = Color.Transparent,
index 8115963a6966f64cb5a990825d7c266a43632e91..f0ab0df4c1b4db0fa4039ea08a44b05bd92f01a6 100644 (file)
Binary files a/packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk and b/packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk differ