فهرست منبع

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 سال پیش
والد
کامیت
95ba34d8d7
1فایلهای تغییر یافته به همراه15 افزوده شده و 6 حذف شده
  1. 15 6
      Widget/Dashboard/DashboardWidgetView.swift

+ 15 - 6
Widget/Dashboard/DashboardWidgetView.swift

@@ -66,12 +66,21 @@ struct DashboardWidgetView: View {
                                     let subTitleColor = Color(white: 0.5)
                                     let imageSize:CGFloat = 35
                                     
-                                    Image(uiImage: element.icon)
-                                        .resizable()
-                                        .scaledToFill()
-                                        .frame(width: imageSize, height: imageSize)
-                                        .clipped()
-                                        .cornerRadius(5)
+                                    if entry.tableDashboard?.itemIconsRound ?? false {
+                                        Image(uiImage: element.icon)
+                                            .resizable()
+                                            .scaledToFill()
+                                            .frame(width: imageSize, height: imageSize)
+                                            .clipShape(Circle())
+                                            .overlay(Circle().stroke(Color.yellow, lineWidth: 1))
+                                    } else {
+                                        Image(uiImage: element.icon)
+                                            .resizable()
+                                            .scaledToFill()
+                                            .frame(width: imageSize, height: imageSize)
+                                            .clipped()
+                                            .cornerRadius(5)
+                                    }
 
                                     VStack(alignment: .leading, spacing: 2) {