mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Working Color, Bluetooth and not working DND
This commit is contained in:
parent
dc774a073b
commit
c00b6db984
12 changed files with 13150 additions and 11440 deletions
|
|
@ -75,11 +75,21 @@ struct MarqueeText: View {
|
|||
self.textSize = CGSize(width: size.width / 2, height: NSFont.preferredFont(forTextStyle: nsFont).pointSize)
|
||||
self.animate = false
|
||||
self.offset = 0
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01){
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.02){
|
||||
if needsScrolling {
|
||||
self.animate = true
|
||||
self.offset = -(textSize.width + 10)
|
||||
|
||||
self.offset = -(textSize.width + 20)
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: text) { _, _ in
|
||||
// Reset animation when text changes
|
||||
self.animate = false
|
||||
self.offset = 0
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.02){
|
||||
if needsScrolling {
|
||||
self.animate = true
|
||||
self.offset = -(textSize.width + 20)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue