Mercurial > public > lazybear
view LazyBear/UI/IndicatorPoint.swift @ 278:47ad897925b6
Minor UI updates ChartViews
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Fri, 19 Mar 2021 16:34:38 +0100 |
parents | 62f2c675b666 |
children |
line wrap: on
line source
// // IndicatorPoint.swift // LazyBear // // Created by Dennis Concepción Martín on 17/3/21. // import SwiftUI struct IndicatorPoint: View { @FetchRequest(entity: UserSettings.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \UserSettings.changedAt, ascending: false)]) var userSettings: FetchedResults<UserSettings> var body: some View { let colour = Color("\(userSettings.first?.theme?.lowercased() ?? "default")Accent") Circle() .frame(width: 20, height: 20) .foregroundColor(colour) } } struct IndicatorPoint_Previews: PreviewProvider { static var previews: some View { IndicatorPoint() } }