comparison LazyBear/Views/Company/Chart.swift @ 413:2984d8946342

Minor UI changes
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 09 Jun 2021 10:23:52 +0200
parents a7c9dd0c5822
children 34f9e408b861
comparison
equal deleted inserted replaced
412:a7c9dd0c5822 413:2984d8946342
36 HStack { 36 HStack {
37 if let quote = company.chartData.quote![symbol.uppercased()] { 37 if let quote = company.chartData.quote![symbol.uppercased()] {
38 let latestPrice = quote.latestPrice ?? 0 38 let latestPrice = quote.latestPrice ?? 0
39 let changePercent = quote.changePercent ?? 0 39 let changePercent = quote.changePercent ?? 0
40 let priceViewStyle = PriceViewStyle( 40 let priceViewStyle = PriceViewStyle(
41 alignment: .leading, 41 horizontalAlignment: .leading,
42 verticalAlignment: .center,
43 orientation: .HStack,
42 priceFont: .title3, 44 priceFont: .title3,
43 priceFontWeight: .semibold, 45 priceFontWeight: .semibold,
44 percentFont: .headline, 46 percentFont: .headline,
45 percentFontWeight: .medium 47 percentFontWeight: .medium,
48 showBackground: true
46 ) 49 )
47 PriceView(latestPrice: latestPrice, changePercent: changePercent, style: priceViewStyle) 50 PriceView(latestPrice: latestPrice, changePercent: changePercent, style: priceViewStyle)
48 } 51 }
49 Spacer() 52 Spacer()
50 } 53 }