Skip to content

Commit

Permalink
Add some Sonoma stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Desbeers committed Nov 24, 2023
1 parent b4f5aa7 commit 068d64d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Chord Provider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
MACOSX_DEPLOYMENT_TARGET = 13.5;
MARKETING_VERSION = 4.0;
PRODUCT_BUNDLE_IDENTIFIER = nl.desbeers.chordprovider4;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -859,7 +859,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
MACOSX_DEPLOYMENT_TARGET = 13.5;
MARKETING_VERSION = 4.0;
PRODUCT_BUNDLE_IDENTIFIER = nl.desbeers.chordprovider4;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 2 additions & 0 deletions Chord Provider/Views/EditorView/EditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import SwiftUI
struct EditorView: View {
/// The ChordPro document
@Binding var document: ChordProDocument
/// The app state
@EnvironmentObject var appState: AppState
/// The scene state
@EnvironmentObject var sceneState: SceneState
/// Show a directive sheet
Expand Down
15 changes: 12 additions & 3 deletions Chord Provider/macOS/FileBrowserView (macOS).swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct FileBrowserView: View {
}
.pickerStyle(.segmented)
.labelsHidden()
.disabled(!search.isEmpty)
.task(id: tabItem) {
selectedTag = []
}
Expand All @@ -56,6 +57,7 @@ struct FileBrowserView: View {
}
}
}
.searchable(text: $search, placement: .sidebar)
.opacity(selectedTag.isEmpty ? 1 : 0)
.navigationDestination(for: String.self) { tag in
List {
Expand Down Expand Up @@ -92,9 +94,14 @@ struct FileBrowserView: View {
allTags = Array(Set(tags).sorted())
}
.toolbar {
folderButton
if #available(macOS 14, *) {
folderButton
.fileDialogMessage("Select a folder with your songs")
.fileDialogConfirmationLabel("Select")
} else {
folderButton
}
}
.searchable(text: $search, placement: .sidebar)
}
/// Folder selection button
var folderButton: some View {
Expand Down Expand Up @@ -153,6 +160,8 @@ extension FileBrowserView {
@EnvironmentObject private var fileBrowser: FileBrowser
/// Open documents in the environment
@Environment(\.openDocument) private var openDocument
/// Focus of the Window
@Environment(\.controlActiveState) var controlActiveState
/// Information about the `NSWindow`
var window: NSWindow.WindowItem? {
fileBrowser.openWindows.first { $0.fileURL == song.fileURL }
Expand All @@ -174,7 +183,7 @@ extension FileBrowserView {
}
if !song.tags.isEmpty {
Text(song.tags.joined(separator: ""))
.foregroundStyle(.tertiary)
.foregroundStyle(controlActiveState == .key ? .tertiary : .quaternary)
}
}
},
Expand Down

0 comments on commit 068d64d

Please sign in to comment.