浏览代码

improved widget

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父节点
当前提交
f0506377eb
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 3 2
      Widget/Dashboard/DashboardWidgetView.swift
  2. 3 2
      Widget/Files/FilesWidgetView.swift

+ 3 - 2
Widget/Dashboard/DashboardWidgetView.swift

@@ -185,10 +185,11 @@ struct DashboardWidgetView: View {
 
                     Text(entry.footerText)
                         .font(.caption2)
-                        .padding(.trailing, 13.0)
+                        .lineLimit(1)
                         .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                 }
-                .frame(maxWidth: geo.size.width - 5, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
+                .padding(.horizontal, 15.0)
+                .frame(maxWidth: geo.size.width, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
             }
         }
     }

+ 3 - 2
Widget/Files/FilesWidgetView.swift

@@ -175,10 +175,11 @@ struct FilesWidgetView: View {
                 
                     Text(entry.footerText)
                         .font(.caption2)
-                        .padding(.trailing, 13.0)
+                        .lineLimit(1)
                         .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                 }
-                .frame(maxWidth: geo.size.width - 5, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
+                .padding(.horizontal, 15.0)
+                .frame(maxWidth: geo.size.width, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
             }
         }
     }