Mercurial > public > simoleon
comparison Simoleon/Helpers/CurrencyRow.swift @ 95:04feeb708833
Minor UI updates
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 03 Aug 2021 15:02:40 +0100 |
parents | 1069c33d3a42 |
children | 6eac99e99b96 |
comparison
equal
deleted
inserted
replaced
94:507ed393a72c | 95:04feeb708833 |
---|---|
18 Image(currencyMetadata[String(currencies[0])]!.flag) | 18 Image(currencyMetadata[String(currencies[0])]!.flag) |
19 .resizable() | 19 .resizable() |
20 .aspectRatio(contentMode: .fill) | 20 .aspectRatio(contentMode: .fill) |
21 .frame(width: 30, height: 30) | 21 .frame(width: 30, height: 30) |
22 .clipShape(Circle()) | 22 .clipShape(Circle()) |
23 .overlay(Circle().stroke(Color(.systemGray), lineWidth: 1)) | 23 .overlay(Circle().stroke(Color(.secondaryLabel), lineWidth: 1)) |
24 | 24 |
25 Image(currencyMetadata[String(currencies[1])]!.flag) | 25 Image(currencyMetadata[String(currencies[1])]!.flag) |
26 .resizable() | 26 .resizable() |
27 .aspectRatio(contentMode: .fill) | 27 .aspectRatio(contentMode: .fill) |
28 .frame(width: 30, height: 30) | 28 .frame(width: 30, height: 30) |
29 .clipShape(Circle()) | 29 .clipShape(Circle()) |
30 .overlay(Circle().stroke(Color(.systemGray), lineWidth: 1)) | 30 .overlay(Circle().stroke(Color(.secondaryLabel), lineWidth: 1)) |
31 .offset(x: -20) | 31 .offset(x: -20) |
32 .padding(.trailing, -20) | 32 .padding(.trailing, -20) |
33 | 33 |
34 Text("From \(String(currencies[0])) to \(String(currencies[1]))") | 34 Text("From \(String(currencies[0])) to \(String(currencies[1]))") |
35 .fontWeight(.semibold) | 35 .fontWeight(.semibold) |
38 | 38 |
39 Spacer() | 39 Spacer() |
40 | 40 |
41 if isLocked ?? false { | 41 if isLocked ?? false { |
42 Image(systemName: "lock") | 42 Image(systemName: "lock") |
43 .foregroundColor(Color(.systemGray)) | 43 .foregroundColor(.secondary) |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 struct CurrencyRow_Previews: PreviewProvider { | 49 struct CurrencyRow_Previews: PreviewProvider { |
50 static var previews: some View { | 50 static var previews: some View { |
51 CurrencyRow(currencyPairName: "USD/GBP") | 51 CurrencyRow(currencyPairName: "USD/GBP", isLocked: true) |
52 } | 52 } |
53 } | 53 } |