|
@@ -35,7 +35,7 @@ struct NextcloudWidgetView: View {
|
|
|
.scaledToFit()
|
|
|
.frame(width: 20, height: 20)
|
|
|
.cornerRadius(5)
|
|
|
- Text(NCBrandOptions.shared.brand + "")
|
|
|
+ Text(NCBrandOptions.shared.brand)
|
|
|
.font(.system(size: 12))
|
|
|
.textCase(.uppercase)
|
|
|
}
|
|
@@ -77,9 +77,9 @@ struct NextcloudWidgetView: View {
|
|
|
Image("buttonAddImage")
|
|
|
.resizable()
|
|
|
.renderingMode(.template)
|
|
|
- .foregroundColor(Color(NCBrandColor.shared.brandText))
|
|
|
+ .foregroundColor(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brandText))
|
|
|
.padding(10)
|
|
|
- .background(Color(NCBrandColor.shared.brand))
|
|
|
+ .background(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brand))
|
|
|
.clipShape(Circle())
|
|
|
.scaledToFit()
|
|
|
.frame(width: geo.size.width/4, height: 50)
|
|
@@ -89,9 +89,9 @@ struct NextcloudWidgetView: View {
|
|
|
Image("buttonAddScan")
|
|
|
.resizable()
|
|
|
.renderingMode(.template)
|
|
|
- .foregroundColor(Color(NCBrandColor.shared.brandText))
|
|
|
+ .foregroundColor(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brandText))
|
|
|
.padding(10)
|
|
|
- .background(Color(NCBrandColor.shared.brand))
|
|
|
+ .background(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brand))
|
|
|
.clipShape(Circle())
|
|
|
.scaledToFit()
|
|
|
.frame(width: geo.size.width/4, height: 50)
|
|
@@ -101,9 +101,9 @@ struct NextcloudWidgetView: View {
|
|
|
Image("note.text")
|
|
|
.resizable()
|
|
|
.renderingMode(.template)
|
|
|
- .foregroundColor(Color(NCBrandColor.shared.brandText))
|
|
|
+ .foregroundColor(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brandText))
|
|
|
.padding(10)
|
|
|
- .background(Color(NCBrandColor.shared.brand))
|
|
|
+ .background(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brand))
|
|
|
.clipShape(Circle())
|
|
|
.scaledToFit()
|
|
|
.frame(width: geo.size.width/4, height: 50)
|
|
@@ -113,9 +113,9 @@ struct NextcloudWidgetView: View {
|
|
|
Image("microphone")
|
|
|
.resizable()
|
|
|
.renderingMode(.template)
|
|
|
- .foregroundColor(Color(NCBrandColor.shared.brandText))
|
|
|
+ .foregroundColor(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brandText))
|
|
|
.padding(10)
|
|
|
- .background(Color(NCBrandColor.shared.brand))
|
|
|
+ .background(entry.isPlaceholder ? Color(white: 0.8) : Color(NCBrandColor.shared.brand))
|
|
|
.clipShape(Circle())
|
|
|
.scaledToFit()
|
|
|
.frame(width: geo.size.width/4, height: 50)
|
|
@@ -143,7 +143,7 @@ struct NextcloudWidgetView: View {
|
|
|
|
|
|
struct NextcloudWidget_Previews: PreviewProvider {
|
|
|
static var previews: some View {
|
|
|
- let entry = NextcloudDataEntry(date: Date(), recentDatas: recentDatasTest, isPlaceholder: false, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " widget")
|
|
|
+ let entry = NextcloudDataEntry(date: Date(), recentDatas: recentDatasTest, isPlaceholder: true, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " widget")
|
|
|
NextcloudWidgetView(entry: entry).previewContext(WidgetPreviewContext(family: .systemLarge))
|
|
|
}
|
|
|
}
|