mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 14:56:15 +00:00
replaced all the .apply s everywhere colorcodable into its own file add icon changing for mac
38 lines
682 B
Swift
38 lines
682 B
Swift
//
|
|
// Extension.swift
|
|
// NearFuture
|
|
//
|
|
// Created by neon443 on 21/05/2025.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
extension View {
|
|
var backgroundGradient: some View {
|
|
return LinearGradient(
|
|
gradient: Gradient(colors: [.bgTop, .two]),
|
|
startPoint: .top,
|
|
endPoint: .bottom
|
|
)
|
|
.ignoresSafeArea(.all)
|
|
}
|
|
}
|
|
|
|
extension AnyTransition {
|
|
static var moveAndFade: AnyTransition {
|
|
.asymmetric(
|
|
insertion: .move(edge: .leading),
|
|
removal: .move(edge: .trailing)
|
|
)
|
|
.combined(with: .opacity)
|
|
}
|
|
static var moveAndFadeReversed: AnyTransition {
|
|
.asymmetric(
|
|
insertion: .move(edge: .trailing),
|
|
removal: .move(edge: .leading)
|
|
)
|
|
.combined(with: .opacity)
|
|
}
|
|
}
|