diff --git a/boringNotch.xcodeproj/project.pbxproj b/boringNotch.xcodeproj/project.pbxproj index f4d899e..55b4093 100644 --- a/boringNotch.xcodeproj/project.pbxproj +++ b/boringNotch.xcodeproj/project.pbxproj @@ -81,7 +81,6 @@ B19016242CC15B5000E3F12E /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = B19016232CC15B4D00E3F12E /* Constants.swift */; }; B1A78C822C8BA08100BD51B0 /* FullscreenMediaDetection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A78C812C8BA08100BD51B0 /* FullscreenMediaDetection.swift */; }; B1A78C842C8C65ED00BD51B0 /* MediaRemote.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1A78C832C8C65ED00BD51B0 /* MediaRemote.framework */; }; - B1A78C852C8C65ED00BD51B0 /* MediaRemote.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B1A78C832C8C65ED00BD51B0 /* MediaRemote.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; B1B1128F2C6A56E800093D8F /* DynamicNotch.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B1128E2C6A56E800093D8F /* DynamicNotch.swift */; }; B1B112912C6A572100093D8F /* EditPanelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B112902C6A572100093D8F /* EditPanelView.swift */; }; B1B112932C6A577E00093D8F /* MouseTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B112922C6A577E00093D8F /* MouseTracker.swift */; }; @@ -103,7 +102,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - B1A78C852C8C65ED00BD51B0 /* MediaRemote.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; diff --git a/boringNotch/ContentView.swift b/boringNotch/ContentView.swift index 192d646..8faee86 100644 --- a/boringNotch/ContentView.swift +++ b/boringNotch/ContentView.swift @@ -219,7 +219,7 @@ struct ContentView: View { MusicLiveActivity() } else { BoringHeader() - .frame(height: Sizes().size.closed.height!) + .frame(height: max(24, Sizes().size.closed.height!)) .blur(radius: abs(gestureProgress) > 0.3 ? min(abs(gestureProgress), 8) : 0) } @@ -282,9 +282,9 @@ struct ContentView: View { .clipped() .clipShape(RoundedRectangle(cornerRadius: vm.musicPlayerSizes.image.cornerRadius.closed.inset!)) .matchedGeometryEffect(id: "albumArt", in: albumArtNamespace) - .frame(width: Sizes().size.closed.height! - 12, height: Sizes().size.closed.height! - 12) + .frame(width: max(0, Sizes().size.closed.height! - 12), height: max(0, Sizes().size.closed.height! - 12)) } - .frame(width: Sizes().size.closed.height! - (hoverAnimation ? 0 : 12) + gestureProgress / 2, height: Sizes().size.closed.height! - (hoverAnimation ? 0 : 12)) + .frame(width: max(0, Sizes().size.closed.height! - (hoverAnimation ? 0 : 12) + gestureProgress / 2), height: max(0, Sizes().size.closed.height! - (hoverAnimation ? 0 : 12))) Rectangle() .fill(.black) @@ -300,7 +300,8 @@ struct ContentView: View { .frame(width: 16, height: 12) } } - .frame(width: Sizes().size.closed.height! - (hoverAnimation ? 0 : 12) + gestureProgress / 2, height: Sizes().size.closed.height! - (hoverAnimation ? 0 : 12), alignment: .center) + .frame(width: max(0, Sizes().size.closed.height! - (hoverAnimation ? 0 : 12) + gestureProgress / 2), + height: max(0,Sizes().size.closed.height! - (hoverAnimation ? 0 : 12)), alignment: .center) } .frame(height: Sizes().size.closed.height! + (hoverAnimation ? 8 : 0), alignment: .center) } diff --git a/boringNotch/components/Notch/NotchContentView.swift b/boringNotch/components/Notch/NotchContentView.swift index a7fbe94..60fc55b 100644 --- a/boringNotch/components/Notch/NotchContentView.swift +++ b/boringNotch/components/Notch/NotchContentView.swift @@ -122,7 +122,7 @@ struct NotchContentView: View { func calculateFrameWidthforNotchContent() -> CGFloat? { // Calculate intermediate values - let chargingInfoWidth: CGFloat = vm.expandingView.show ? ((vm.expandingView.type == .download ? downloadSneakSize.width : batterySenakSize.width) + 10) : 0 + let chargingInfoWidth: CGFloat = vm.expandingView.show ? ((vm.expandingView.type == .download ? downloadSneakSize.width : batterySneakSize.width) + 10) : 0 let musicPlayingWidth: CGFloat = (!vm.firstLaunch && !vm.expandingView.show && (musicManager.isPlaying || (musicManager.isPlayerIdle ? Defaults[.showNotHumanFace] : true))) ? 60 : -15 let closedWidth: CGFloat = vm.sizes.size.closed.width! - 5 diff --git a/boringNotch/sizing/matters.swift b/boringNotch/sizing/matters.swift index d19f920..2bce9eb 100644 --- a/boringNotch/sizing/matters.swift +++ b/boringNotch/sizing/matters.swift @@ -12,7 +12,7 @@ import Defaults var closedNotchSize: CGSize = setNotchSize() var downloadSneakSize: CGSize = .init(width: 65, height: 1) -var batterySenakSize: CGSize = .init(width: 160, height: 1) +var batterySneakSize: CGSize = .init(width: 160, height: 1) func setNotchSize(screen: String? = nil) -> CGSize { // Default notch size, to avoid using optionals