mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Finally fixed: added explicit cancellation checks, need to verify by independent testers
This commit is contained in:
parent
093f95c49d
commit
b8f403d537
7 changed files with 527 additions and 185 deletions
31
DynamicIsland/models/LockScreenReminderWidgetSnapshot.swift
Normal file
31
DynamicIsland/models/LockScreenReminderWidgetSnapshot.swift
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import SwiftUI
|
||||
import AppKit
|
||||
|
||||
struct LockScreenReminderWidgetSnapshot: Equatable {
|
||||
struct RGBAColor: Equatable {
|
||||
let red: Double
|
||||
let green: Double
|
||||
let blue: Double
|
||||
let alpha: Double
|
||||
|
||||
init(nsColor: NSColor) {
|
||||
let color = nsColor.usingColorSpace(.sRGB) ?? nsColor
|
||||
self.red = Double(color.redComponent)
|
||||
self.green = Double(color.greenComponent)
|
||||
self.blue = Double(color.blueComponent)
|
||||
self.alpha = Double(color.alphaComponent)
|
||||
}
|
||||
|
||||
var color: Color {
|
||||
Color(red: red, green: green, blue: blue, opacity: alpha)
|
||||
}
|
||||
}
|
||||
|
||||
let title: String
|
||||
let eventTimeText: String
|
||||
let relativeDescription: String?
|
||||
let accent: RGBAColor
|
||||
let chipStyle: LockScreenReminderChipStyle
|
||||
let isCritical: Bool
|
||||
let iconName: String
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue