浏览代码

Color fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父节点
当前提交
fcdcfc6a8d
共有 1 个文件被更改,包括 10 次插入16 次删除
  1. 10 16
      Widget/Toolbar/ToolbarWidgetView.swift

+ 10 - 16
Widget/Toolbar/ToolbarWidgetView.swift

@@ -40,17 +40,14 @@ struct ToolbarWidgetView: View {
                 HStack(spacing: 0) {
 
                     let sizeButton: CGFloat = 65
-                    let placeholderColor = Color(white: 0.8)
-                    let brandColor = Color(NCBrandColor.shared.brand)
-                    let brandTextColor = Color(NCBrandColor.shared.brandText)
 
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionUploadAsset, label: {
                         Image("addImage")
                             .resizable()
                             .renderingMode(.template)
-                            .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
+                            .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brandText))
                             .padding()
-                            .background(entry.isPlaceholder ? placeholderColor : brandColor)
+                            .background(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                             .clipShape(Circle())
                             .scaledToFit()
                             .frame(width: geo.size.width / 4, height: sizeButton)
@@ -60,9 +57,9 @@ struct ToolbarWidgetView: View {
                         Image("scan")
                             .resizable()
                             .renderingMode(.template)
-                            .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
+                            .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brandText))
                             .padding()
-                            .background(entry.isPlaceholder ? placeholderColor : brandColor)
+                            .background(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                             .clipShape(Circle())
                             .scaledToFit()
                             .frame(width: geo.size.width / 4, height: sizeButton)
@@ -72,9 +69,9 @@ struct ToolbarWidgetView: View {
                         Image("note.text")
                             .resizable()
                             .renderingMode(.template)
-                            .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
+                            .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brandText))
                             .padding()
-                            .background(entry.isPlaceholder ? placeholderColor : brandColor)
+                            .background(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                             .clipShape(Circle())
                             .scaledToFit()
                             .frame(width: geo.size.width / 4, height: sizeButton)
@@ -83,9 +80,9 @@ struct ToolbarWidgetView: View {
                     Link(destination: entry.isPlaceholder ? NCGlobal.shared.widgetActionNoAction : NCGlobal.shared.widgetActionVoiceMemo, label: {
                         Image("microphone")
                             .resizable()
-                            .foregroundColor(entry.isPlaceholder ? placeholderColor : brandTextColor)
+                            .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brandText))
                             .padding()
-                            .background(entry.isPlaceholder ? placeholderColor : brandColor)
+                            .background(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                             .clipShape(Circle())
                             .scaledToFit()
                             .frame(width: geo.size.width / 4, height: sizeButton)
@@ -96,19 +93,16 @@ struct ToolbarWidgetView: View {
 
                 HStack {
 
-                    let placeholderColor = Color(white: 0.2)
-                    let brandColor = Color(NCBrandColor.shared.brand)
-
                     Image(systemName: entry.footerImage)
                         .resizable()
                         .scaledToFit()
                         .frame(width: 15, height: 15)
-                        .foregroundColor(entry.isPlaceholder ? placeholderColor : brandColor)
+                        .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
 
                     Text(entry.footerText)
                         .font(.caption2)
                         .padding(.trailing, 13.0)
-                        .foregroundColor(entry.isPlaceholder ? placeholderColor : brandColor)
+                        .foregroundColor(entry.isPlaceholder ? Color(.systemGray4) : Color(NCBrandColor.shared.brand))
                 }
                 .frame(maxWidth: geo.size.width - 5, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
             }