Use IOSOnlyNavBar (compact header) on iPhone, iPad, and Catalyst. Only use macNavigationHeader on true Mac iPad App (Designed for iPad). Changes: - IOSOnlyNavBar now applies to all except isTrueMacApp - navigationBarTitle uses .inline displayMode for compact style - On Catalyst: hide default toolbar to prevent Edit/Delete buttons override - Catalyst now shows compact header matching iPhone style This ensures consistent compact navigation across iPhone, iPad, and Catalyst, while preserving the full header only for true Mac apps.
@@ -160,7 +160,7 @@ struct MeterView: View {
|
||
| 160 | 160 |
} |
| 161 | 161 |
.background(meterBackground) |
| 162 | 162 |
.modifier(IOSOnlyNavBar( |
| 163 |
- apply: !Self.isTrueMacApp && Self.isPhone, |
|
| 163 |
+ apply: !Self.isTrueMacApp, |
|
| 164 | 164 |
title: navBarTitle, |
| 165 | 165 |
showRSSI: navBarShowRSSI, |
| 166 | 166 |
rssi: navBarRSSI, |
@@ -669,7 +669,7 @@ private struct IOSOnlyNavBar: ViewModifier {
|
||
| 669 | 669 |
func body(content: Content) -> some View {
|
| 670 | 670 |
if apply {
|
| 671 | 671 |
content |
| 672 |
- .navigationBarTitle(title) |
|
| 672 |
+ .navigationBarTitle(title, displayMode: .inline) |
|
| 673 | 673 |
.toolbar {
|
| 674 | 674 |
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
| 675 | 675 |
MeterConnectionToolbarButton( |
@@ -685,6 +685,11 @@ private struct IOSOnlyNavBar: ViewModifier {
|
||
| 685 | 685 |
} |
| 686 | 686 |
} |
| 687 | 687 |
} |
| 688 |
+ #if targetEnvironment(macCatalyst) |
|
| 689 |
+ .toolbar {
|
|
| 690 |
+ ToolbarItemGroup(placement: .primaryAction) {}
|
|
| 691 |
+ } |
|
| 692 |
+ #endif |
|
| 688 | 693 |
} else {
|
| 689 | 694 |
content |
| 690 | 695 |
} |