mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Working - need to fix ui issues
This commit is contained in:
parent
97566b754b
commit
fed1a43f88
12 changed files with 510 additions and 65 deletions
|
|
@ -349,6 +349,9 @@ extension Defaults.Keys {
|
|||
// Polling removed - now uses event-driven private API detection (CGSIsScreenWatcherPresent)
|
||||
// static let enableScreenRecordingPolling = Key<Bool>("enableScreenRecordingPolling", default: false)
|
||||
|
||||
// MARK: Minimalistic UI Mode
|
||||
static let enableMinimalisticUI = Key<Bool>("enableMinimalisticUI", default: false)
|
||||
|
||||
// Helper to determine the default media controller based on macOS version
|
||||
static var defaultMediaController: MediaControllerType {
|
||||
if #available(macOS 15.4, *) {
|
||||
|
|
|
|||
|
|
@ -132,9 +132,12 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
}
|
||||
|
||||
private func calculateDynamicNotchSize() -> CGSize {
|
||||
// Use minimalistic size if minimalistic UI is enabled
|
||||
let baseSize = Defaults[.enableMinimalisticUI] ? minimalisticOpenNotchSize : openNotchSize
|
||||
|
||||
// Only apply dynamic sizing when on stats tab and stats are enabled
|
||||
guard DynamicIslandViewCoordinator.shared.currentView == .stats && Defaults[.enableStatsFeature] else {
|
||||
return openNotchSize
|
||||
return baseSize
|
||||
}
|
||||
|
||||
let enabledGraphsCount = [
|
||||
|
|
@ -148,10 +151,10 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
// If 4+ graphs are enabled, increase width
|
||||
if enabledGraphsCount >= 4 {
|
||||
let extraWidth: CGFloat = CGFloat(enabledGraphsCount - 3) * 120
|
||||
return CGSize(width: openNotchSize.width + extraWidth, height: openNotchSize.height)
|
||||
return CGSize(width: baseSize.width + extraWidth, height: baseSize.height)
|
||||
}
|
||||
|
||||
return openNotchSize
|
||||
return baseSize
|
||||
}
|
||||
|
||||
func close() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue