perf(ui): 移除监控动效并精简原生图表绘制
This commit is contained in:
@@ -9,7 +9,6 @@ struct MenuPanelView: View {
|
||||
var presentation = PanelPresentation()
|
||||
var onOpenSettings: () -> Void = {}
|
||||
@Environment(\.locale) var locale
|
||||
@Environment(\.accessibilityReduceMotion) var reduceMotion
|
||||
@State private var panelSize = PanelLayout.contentSize(visible: NSScreen.main?.visibleFrame ?? CGRect(x: 0, y: 0, width: 1000, height: 760))
|
||||
@State var selectedInterface = ""
|
||||
@State var publicIPAddress: String?
|
||||
@@ -75,9 +74,7 @@ struct MenuPanelView: View {
|
||||
}
|
||||
.background(Color("PanelBackground"), in: .rect(cornerRadius: 18))
|
||||
.clipShape(.rect(cornerRadius: 18))
|
||||
.environment(\.metricAnimationsEnabled, MetricMotionPolicy.enabled(
|
||||
reduced: preferences.reduceMotion, systemReduced: reduceMotion, visible: metrics.isPanelVisible,
|
||||
paused: metrics.isPaused, sleeping: metrics.isSystemSleeping || metrics.isDisplaySleeping))
|
||||
.transaction { $0.animation = nil; $0.disablesAnimations = true }
|
||||
.modifier(AppearanceStyle(preferences: preferences))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user