diff --git a/AppLibrary.xcodeproj/project.pbxproj b/AppLibrary.xcodeproj/project.pbxproj index 4aa26d7..8f87e97 100644 --- a/AppLibrary.xcodeproj/project.pbxproj +++ b/AppLibrary.xcodeproj/project.pbxproj @@ -450,7 +450,7 @@ CODE_SIGN_ENTITLEMENTS = AppLibrary/AppLibrary.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 456; + CURRENT_PROJECT_VERSION = 475; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = 838RGQ32CA; ENABLE_HARDENED_RUNTIME = YES; @@ -482,7 +482,7 @@ CODE_SIGN_ENTITLEMENTS = AppLibrary/AppLibrary.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 456; + CURRENT_PROJECT_VERSION = 475; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = 838RGQ32CA; ENABLE_HARDENED_RUNTIME = YES; diff --git a/AppLibrary/Views/App Library/AppListView.swift b/AppLibrary/Views/App Library/AppListView.swift index 448b7b0..ad45d1e 100644 --- a/AppLibrary/Views/App Library/AppListView.swift +++ b/AppLibrary/Views/App Library/AppListView.swift @@ -2,6 +2,7 @@ import SwiftUI struct AppListView: View { let apps: [ApplicationInformation] +// @State private var selection: ApplicationInformation.ID? = nil var body: some View { ScrollView(showsIndicators: false) { @@ -10,6 +11,7 @@ struct AppListView: View { .frame(height: 52) ForEach(apps) { app in + // ListTile(app: app, isSelected: selection == app.id) ListTile(app: app) } diff --git a/AppLibrary/Views/App Library/ListTile.swift b/AppLibrary/Views/App Library/ListTile.swift index 7210586..3d6809c 100644 --- a/AppLibrary/Views/App Library/ListTile.swift +++ b/AppLibrary/Views/App Library/ListTile.swift @@ -3,8 +3,12 @@ import SwiftUI struct ListTile: View { private static let iconAxis: Int = 44 private static let iconSize: CGSize = CGSize(width: iconAxis, height: iconAxis) +// private static let borderStrokeWidth: Double = 2 let app: ApplicationInformation +// let isSelected: Bool + +// @State private var contextVisible: Bool = false private var label: String { if app.displayName.hasSuffix(".app") { @@ -32,13 +36,16 @@ struct ListTile: View { .contentShape(containerShape) } .buttonStyle(.plain) - .contentShape(containerShape) +// .background(.selection.opacity(isSelected ? 1 : 0), in: containerShape) +// .background(.selection.opacity(contextVisible ? 1 : 0), in: containerShape.inset(by: Self.borderStrokeWidth * 0.5).stroke(lineWidth: Self.borderStrokeWidth)) .contextMenu { TileContextMenu(app: app) +// .onAppear { contextVisible = true } +// .onDisappear { contextVisible = false } } } - private var containerShape: some Shape { - RoundedRectangle(cornerRadius: 12, style: .continuous) + private var containerShape: RoundedRectangle { + RoundedRectangle(cornerRadius: 8, style: .continuous) } } diff --git a/AppLibrary/Views/App Library/SearchBar.swift b/AppLibrary/Views/App Library/SearchBar.swift index ba5547a..3b956b0 100644 --- a/AppLibrary/Views/App Library/SearchBar.swift +++ b/AppLibrary/Views/App Library/SearchBar.swift @@ -11,14 +11,14 @@ struct SearchBar: View { .padding(.horizontal, 8) .frame(height: 36) .frame(maxWidth: .infinity) - .background(.thinMaterial, in: containerShape) + .background(.regularMaterial, in: containerShape) .overlay(.separator, in: containerShape.stroke(lineWidth: 1)) - .padding(8) .compositingGroup() + .padding(8) .shadowRcp(color: .black.opacity(colorScheme == .dark ? 0.5 : 0.25), radius: 16, x: 0, y: 8, base: 0.8) } - private var containerShape: some Shape { + private var containerShape: RoundedRectangle { RoundedRectangle(cornerRadius: 8, style: .continuous) } }