Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/panda-glows'
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkunkli committed Oct 28, 2024
2 parents ff44d5d + a1dbbf7 commit ecfb8f7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions boringNotch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -103,7 +102,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
B1A78C852C8C65ED00BD51B0 /* MediaRemote.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down
9 changes: 5 additions & 4 deletions boringNotch/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion boringNotch/components/Notch/NotchContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion boringNotch/sizing/matters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ecfb8f7

Please sign in to comment.