Skip to content

Commit dd9b6f8

Browse files
Oliver Amescodex
andcommitted
Prepare Ping Warden 2.4.2
Fix the macOS 27 AttributeGraph crash by giving the donation prompt an explicit SwiftUI content size and matching AppKit window content rect, avoiding recursive button/window measurement during prompt creation. Restore Settings title readability with the native titlebar material and soft scroll-edge treatment, hide the Ping History picker label, and bump app, helper, and widget versions to 2.4.2. Co-Authored-By: Codex <codex@openai.com>
1 parent a0377bd commit dd9b6f8

8 files changed

Lines changed: 69 additions & 14 deletions

File tree

PingWarden/PingWarden.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
"@executable_path/../Frameworks",
414414
);
415415
MACOSX_DEPLOYMENT_TARGET = 13.0;
416-
MARKETING_VERSION = 2.4.1;
416+
MARKETING_VERSION = 2.4.2;
417417
PRODUCT_BUNDLE_IDENTIFIER = com.amesvt.pingwarden;
418418
PRODUCT_NAME = "Ping Warden";
419419
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -454,7 +454,7 @@
454454
"@executable_path/../Frameworks",
455455
);
456456
MACOSX_DEPLOYMENT_TARGET = 13.0;
457-
MARKETING_VERSION = 2.4.1;
457+
MARKETING_VERSION = 2.4.2;
458458
PRODUCT_BUNDLE_IDENTIFIER = com.amesvt.pingwarden;
459459
PRODUCT_NAME = "Ping Warden";
460460
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -650,7 +650,7 @@
650650
"@executable_path/../../../../Frameworks",
651651
);
652652
MACOSX_DEPLOYMENT_TARGET = 26.0;
653-
MARKETING_VERSION = 2.4.1;
653+
MARKETING_VERSION = 2.4.2;
654654
PRODUCT_BUNDLE_IDENTIFIER = com.amesvt.pingwarden.widget;
655655
PRODUCT_NAME = "$(TARGET_NAME)";
656656
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -687,7 +687,7 @@
687687
"@executable_path/../../../../Frameworks",
688688
);
689689
MACOSX_DEPLOYMENT_TARGET = 26.0;
690-
MARKETING_VERSION = 2.4.1;
690+
MARKETING_VERSION = 2.4.2;
691691
PRODUCT_BUNDLE_IDENTIFIER = com.amesvt.pingwarden.widget;
692692
PRODUCT_NAME = "$(TARGET_NAME)";
693693
PROVISIONING_PROFILE_SPECIFIER = "";

PingWarden/PingWarden/DashboardView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ struct PingGraphCard: View {
640640
Text(option.label).tag(option.minutes)
641641
}
642642
}
643+
.labelsHidden()
643644
.pickerStyle(.segmented)
644645
.accessibilityLabel("Ping history timeframe")
645646
}

PingWarden/PingWarden/DonationPromptView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import SwiftUI
1212

1313
struct DonationPromptView: View {
1414
static let donationURL = URL(string: "https://buymeacoffee.com/oliverames")!
15+
static let contentSize = CGSize(width: 420, height: 520)
1516

1617
let onSupport: () -> Void
1718
let onMaybeLater: () -> Void
@@ -70,7 +71,7 @@ struct DonationPromptView: View {
7071
.padding(.horizontal, 32)
7172
.padding(.bottom, 24)
7273
}
73-
.frame(width: 420)
74+
.frame(width: Self.contentSize.width, height: Self.contentSize.height)
7475
.background(.regularMaterial)
7576
.accessibilityElement(children: .contain)
7677
}

PingWarden/PingWarden/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.4.1</string>
18+
<string>2.4.2</string>
1919
<key>CFBundleVersion</key>
20-
<string>2.4.1</string>
20+
<string>2.4.2</string>
2121
<key>GCSupportsControllerUserInteraction</key>
2222
<false/>
2323
<key>LSMinimumSystemVersion</key>

PingWarden/PingWarden/PingWardenApp.swift

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,21 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, NSMenuDele
497497
)
498498

499499
let hostingController = NSHostingController(rootView: view)
500-
let window = NSWindow(contentViewController: hostingController)
500+
let contentSize = NSSize(
501+
width: DonationPromptView.contentSize.width,
502+
height: DonationPromptView.contentSize.height
503+
)
504+
hostingController.view.frame = NSRect(origin: .zero, size: contentSize)
505+
506+
let window = NSWindow(
507+
contentRect: NSRect(origin: .zero, size: contentSize),
508+
styleMask: [.titled, .closable, .fullSizeContentView],
509+
backing: .buffered,
510+
defer: false
511+
)
512+
window.contentViewController = hostingController
501513
window.titlebarAppearsTransparent = true
502514
window.titleVisibility = .hidden
503-
window.styleMask = [.titled, .closable, .fullSizeContentView]
504515
window.isMovableByWindowBackground = true
505516
window.backgroundColor = .clear
506517
window.center()
@@ -717,7 +728,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, NSMenuDele
717728
window.isReleasedWhenClosed = false
718729
window.delegate = self
719730
window.toolbarStyle = .unified
720-
window.titlebarAppearsTransparent = true
731+
window.titlebarAppearsTransparent = false
721732
window.toolbar?.showsBaselineSeparator = false
722733
window.setFrameAutosaveName("PingWardenSettings")
723734
window.center()
@@ -1312,10 +1323,35 @@ struct SettingsView: View {
13121323
.navigationTitle(selectedSection.rawValue)
13131324
}
13141325
.navigationSplitViewStyle(.prominentDetail)
1326+
.settingsToolbarMaterial()
13151327
.frame(minWidth: 760, minHeight: 520)
13161328
}
13171329
}
13181330

1331+
private extension View {
1332+
@ViewBuilder
1333+
func settingsToolbarMaterial() -> some View {
1334+
if #available(macOS 15.0, *) {
1335+
self
1336+
.toolbarBackground(.bar, for: .windowToolbar)
1337+
.toolbarBackgroundVisibility(.visible, for: .windowToolbar)
1338+
} else {
1339+
self
1340+
.toolbarBackground(.bar, for: .windowToolbar)
1341+
.toolbarBackground(.visible, for: .windowToolbar)
1342+
}
1343+
}
1344+
1345+
@ViewBuilder
1346+
func settingsScrollEdgeTreatment() -> some View {
1347+
if #available(macOS 26.0, *) {
1348+
self.scrollEdgeEffectStyle(.soft, for: .top)
1349+
} else {
1350+
self
1351+
}
1352+
}
1353+
}
1354+
13191355
enum SettingsSection: String, CaseIterable, Identifiable {
13201356
case dashboard = "Dashboard"
13211357
case general = "General"
@@ -1364,6 +1400,7 @@ struct SettingsContentView: View {
13641400
Spacer(minLength: 20)
13651401
}
13661402
.scrollContentBackground(.hidden)
1403+
.settingsScrollEdgeTreatment()
13671404
}
13681405
// No explicit .background here: on macOS 26 the Settings scene
13691406
// already renders with the system Liquid Glass material, and an
@@ -1576,6 +1613,7 @@ struct GeneralSettingsContent: View {
15761613
}
15771614
}
15781615
.formStyle(.grouped)
1616+
.settingsScrollEdgeTreatment()
15791617
.onAppear {
15801618
monitorState.startObserving()
15811619
}
@@ -1677,6 +1715,7 @@ struct AutomationSettingsContent: View {
16771715
}
16781716
}
16791717
.formStyle(.grouped)
1718+
.settingsScrollEdgeTreatment()
16801719
.onAppear {
16811720
refreshAvailability()
16821721
}
@@ -1821,6 +1860,7 @@ struct AdvancedSettingsContent: View {
18211860
}
18221861
}
18231862
.formStyle(.grouped)
1863+
.settingsScrollEdgeTreatment()
18241864
.confirmationDialog(
18251865
"Re-register Helper?",
18261866
isPresented: $showingReinstallConfirm,

PingWarden/PingWardenHelper/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.4.1</string>
18+
<string>2.4.2</string>
1919
<key>CFBundleVersion</key>
20-
<string>2.4.1</string>
20+
<string>2.4.2</string>
2121
<key>LSMinimumSystemVersion</key>
2222
<string>13.0</string>
2323
<key>NSHumanReadableCopyright</key>

PingWarden/PingWardenWidget/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<key>CFBundlePackageType</key>
1616
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.4.1</string>
18+
<string>2.4.2</string>
1919
<key>CFBundleVersion</key>
20-
<string>2.4.1</string>
20+
<string>2.4.2</string>
2121
<key>NSExtension</key>
2222
<dict>
2323
<key>NSExtensionPointIdentifier</key>

RELEASE_NOTES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Ping Warden 2.4.2
2+
3+
[Support Ping Warden on Buy Me a Coffee](https://buymeacoffee.com/oliverames)
4+
5+
Patch release for the 2.4 line.
6+
7+
## Reliability
8+
- **Donation prompt crash fix**: The support prompt now uses an explicit SwiftUI content size and matching AppKit window content rect. This avoids an unbounded macOS 27 SwiftUI/AppKit button measurement loop that could abort with an AttributeGraph stack overflow.
9+
- **Dashboard picker layout fix**: The Ping History timeframe segmented control no longer shows a squeezed visible picker label when the dashboard card is narrow.
10+
- **Settings title readability**: Settings section titles now use the native macOS titlebar material and soft scroll-edge treatment so scrolled content fades underneath without muddying the header text.
11+
12+
---
13+
114
# Ping Warden 2.4.1
215

316
[Support Ping Warden on Buy Me a Coffee](https://buymeacoffee.com/oliverames)

0 commit comments

Comments
 (0)