Increase button size, use filled icons

This commit is contained in:
2020-12-19 14:11:29 +01:00
parent fbfbc0a324
commit 771879a4fe
3 changed files with 45 additions and 28 deletions

View File

@@ -1,6 +1,10 @@
{
"colors" : [
{
"color" : {
"platform" : "ios",
"reference" : "systemIndigoColor"
},
"idiom" : "universal"
}
],

View File

@@ -36,12 +36,13 @@ struct AttachmentView: View {
guard let url = URL(string: attachmentUrl.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
UIApplication.shared.open(url)
}) {
Image(systemName: "envelope.open")
.foregroundColor(.blue)
.font(.body)
.padding()
Image(systemName: "envelope.open.fill")
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
.padding(8.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
Button(action: {
guard let url = URL(string: attachmentUrl) else { return }
@@ -65,12 +66,13 @@ struct AttachmentView: View {
downloadTask.resume()
}) {
Image(systemName: "square.and.arrow.down")
.foregroundColor(.blue)
.font(.body)
.padding()
Image(systemName: "square.and.arrow.down.fill")
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
.padding(8.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
}
}
}

View File

@@ -37,6 +37,7 @@ struct CircularView: View {
self.showDetail.toggle()
}) {
Image(systemName: "chevron.right.circle")
.foregroundColor(Color("AccentColor"))
.imageScale(.large)
.rotationEffect(.degrees(showDetail ? 90 : 0))
}
@@ -51,12 +52,15 @@ struct CircularView: View {
guard let url = URL(string: circular.url.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
UIApplication.shared.open(url)
}) {
Image(systemName: "envelope.open")
.foregroundColor(.blue)
.font(.body)
.padding()
Image(systemName: "envelope.open.fill")
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
.padding(.leading, 32.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
Spacer()
Button(action: {
guard let url = URL(string: circular.url) else { return }
@@ -80,22 +84,26 @@ struct CircularView: View {
downloadTask.resume()
}) {
Image(systemName: "square.and.arrow.down")
.foregroundColor(.blue)
.font(.body)
.padding()
Image(systemName: "square.and.arrow.down.fill")
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
Spacer()
Button(action: {
iOSRepository.getCircularDao().update(id: circular.id, school: circular.school, favourite: !circular.favourite, reminder: circular.reminder, completionHandler: {_,_ in })
}) {
Image(systemName: circular.favourite ? "bookmark.fill" : "bookmark")
.foregroundColor(.blue)
.font(.body)
.padding()
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
Spacer()
Button(action: {
if circular.reminder {
@@ -110,15 +118,18 @@ struct CircularView: View {
self.creatingReminder = true
}) {
Image(systemName: circular.reminder ? "alarm.fill" : "alarm")
.foregroundColor(.blue)
.font(.body)
.padding()
.resizable()
.scaledToFit()
.frame(width: 20.0, height: 20.0)
.padding(.trailing, 32.0)
}
.buttonStyle(PlainButtonStyle())
.buttonStyle(BorderlessButtonStyle())
.sheet(isPresented: self.$creatingReminder) {
NewReminderView(circular: circular)
}
}
.padding(.vertical, 8.0)
ForEach(0..<circular.attachmentsNames.count, id: \.self) { index in
AttachmentView(attachmentName: circular.attachmentsNames[index] as! String, attachmentUrl: circular.attachmentsUrls[index] as! String)