diff --git a/Yattee/Views/Downloads/DownloadsView.swift b/Yattee/Views/Downloads/DownloadsView.swift index bdb1cb53..a6257f04 100644 --- a/Yattee/Views/Downloads/DownloadsView.swift +++ b/Yattee/Views/Downloads/DownloadsView.swift @@ -38,6 +38,13 @@ struct DownloadsView: View { .navigationTitle(String(localized: "downloads.title")) .toolbarTitleDisplayMode(.inlineLarge) .toolbar { + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif ToolbarItem(placement: .primaryAction) { if let settings = downloadSettings { sortAndGroupMenu(settings) diff --git a/Yattee/Views/Home/BookmarksListView.swift b/Yattee/Views/Home/BookmarksListView.swift index 2d1b088a..db3a9d3d 100644 --- a/Yattee/Views/Home/BookmarksListView.swift +++ b/Yattee/Views/Home/BookmarksListView.swift @@ -153,6 +153,13 @@ struct BookmarksListView: View { .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "bookmarks.search.placeholder"))) .toolbar { + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif ToolbarItem(placement: .primaryAction) { Button { showViewOptions = true diff --git a/Yattee/Views/Home/HistoryListView.swift b/Yattee/Views/Home/HistoryListView.swift index 68da5e76..46e05657 100644 --- a/Yattee/Views/Home/HistoryListView.swift +++ b/Yattee/Views/Home/HistoryListView.swift @@ -167,6 +167,13 @@ struct HistoryListView: View { .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "history.search.placeholder"))) .toolbar { + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif // View options button (always visible) ToolbarItem(placement: .primaryAction) { Button { @@ -184,7 +191,7 @@ struct HistoryListView: View { // Clear history menu (only when not empty) if !history.isEmpty { - ToolbarItem(placement: .automatic) { + ToolbarItem(placement: .primaryAction) { Menu { ForEach(ClearHistoryOption.allCases, id: \.self) { option in Button(role: .destructive) { diff --git a/Yattee/Views/Instances/InstanceBrowseView.swift b/Yattee/Views/Instances/InstanceBrowseView.swift index 8c8e8333..7480ebda 100644 --- a/Yattee/Views/Instances/InstanceBrowseView.swift +++ b/Yattee/Views/Instances/InstanceBrowseView.swift @@ -340,6 +340,13 @@ struct InstanceBrowseView: View { .navigationTitle(instance.displayName) .toolbarTitleDisplayMode(.inlineLarge) .toolbar { + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif ToolbarItem(placement: .primaryAction) { Button { showViewOptions = true diff --git a/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift b/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift index 12cca896..e02c7a99 100644 --- a/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift +++ b/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift @@ -224,6 +224,13 @@ struct PeerTubeInstancesExploreView: View { sheetCloseToolbarItem { dismiss() } #endif + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif ToolbarItem(placement: .primaryAction) { Button { showFiltersSheet = true diff --git a/Yattee/Views/Subscriptions/ManageChannelsView.swift b/Yattee/Views/Subscriptions/ManageChannelsView.swift index 35b4df01..35df1ae8 100644 --- a/Yattee/Views/Subscriptions/ManageChannelsView.swift +++ b/Yattee/Views/Subscriptions/ManageChannelsView.swift @@ -191,6 +191,13 @@ struct ManageChannelsView: View { .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "channels.search.placeholder"))) .toolbar { + #if os(macOS) + // Pin the trailing group (search field + toolbar buttons) to the right edge, + // matching the global Search view. + if #available(macOS 26, *) { + ToolbarSpacer(.flexible, placement: .primaryAction) + } + #endif ToolbarItem(placement: .primaryAction) { Button { showViewOptions = true