mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Working multiple sneak peeks
This commit is contained in:
parent
929b15ba45
commit
4e4623532f
2 changed files with 17 additions and 8 deletions
|
|
@ -472,12 +472,18 @@ struct ContentView: View {
|
|||
else if coordinator.sneakPeek.type == .reminder {
|
||||
if !vm.hideOnClosed && Defaults[.sneakPeekStyles] == .standard, let reminder = reminderManager.activeReminder {
|
||||
GeometryReader { geo in
|
||||
MarqueeText(
|
||||
.constant(reminderSneakPeekText(for: reminder)),
|
||||
textColor: reminderColor(for: reminder, now: reminderManager.currentDate),
|
||||
minDuration: 1,
|
||||
frameWidth: geo.size.width
|
||||
)
|
||||
let chipColor = Color(nsColor: reminder.event.calendar.color).ensureMinimumBrightness(factor: 0.7)
|
||||
HStack(spacing: 6) {
|
||||
RoundedRectangle(cornerRadius: 2)
|
||||
.fill(chipColor)
|
||||
.frame(width: 8, height: 12)
|
||||
MarqueeText(
|
||||
.constant(reminderSneakPeekText(for: reminder)),
|
||||
textColor: reminderColor(for: reminder, now: reminderManager.currentDate),
|
||||
minDuration: 1,
|
||||
frameWidth: max(0, geo.size.width - 18)
|
||||
)
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue