Skip to content

Commit

Permalink
Remove @available(macOS 15, *) for @Previewable
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Aug 14, 2024
1 parent c5d227c commit 1baeee5
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion CotEditor/Sources/AppearanceSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ private extension AppearanceMode {
AppearanceSettingsView()
}

@available(macOS 15, *)
#Preview("FontSettingView") {
@Previewable @State var antialias = false
@Previewable @State var ligature = false
Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/FilterField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ private final class InnerFilterField: NSSearchField {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var text = ""

Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/InsetTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ private final class PaddingTextField: NSTextField {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var text = ""

Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/OpacitySlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ private struct OpacitySample: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview(traits: .fixedLayout(width: 200, height: 50)) {
@Previewable @State var value = 0.6

Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/StepperNumberField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ struct StepperNumberField: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var value = 4

Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/SyntaxCommentEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ private struct CommentDelimitersEditView: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var comment = SyntaxObject.Comment()
@Previewable @State var highlights: [SyntaxObject.Highlight] = []
Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/SyntaxCompletionEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ struct SyntaxCompletionEditView: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var items: [SyntaxObject.KeyString] = [.init(string: "abc")]

Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/SyntaxFileMappingEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ struct SyntaxFileMappingEditView: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var extensions: [SyntaxObject.KeyString] = [.init(string: "abc")]
@Previewable @State var filenames: [SyntaxObject.KeyString] = []
Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/SyntaxHighlightEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ struct SyntaxHighlightEditView: View {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var items: [SyntaxObject.Highlight] = [
.init(begin: "(inu)", end: "(dog)"),
Expand Down
1 change: 0 additions & 1 deletion CotEditor/Sources/SyntaxOutlineEditView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ enum SelectionError: Error {

// MARK: - Preview

@available(macOS 15, *)
#Preview {
@Previewable @State var items: [SyntaxObject.Outline] = [
.init(pattern: "abc"),
Expand Down
3 changes: 0 additions & 3 deletions CotEditor/Sources/ThemeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,12 @@ private extension Theme.SystemDefaultStyle {
ThemeView()
}

@available(macOS 15, *)
#Preview("ThemeEditorView", traits: .fixedLayout(width: 360, height: 280)) {
@Previewable @State var theme = try! ThemeManager.shared.setting(name: "Anura")

return ThemeEditorView(theme: $theme, isBundled: false)
}

@available(macOS 15, *)
#Preview("Metadata (editable)") {
@Previewable @State var metadata = Theme.Metadata(
author: "Clarus",
Expand All @@ -368,7 +366,6 @@ private extension Theme.SystemDefaultStyle {
return ThemeMetadataView(metadata: $metadata, isEditable: true)
}

@available(macOS 15, *)
#Preview("Metadata (fixed)") {
@Previewable @State var metadata = Theme.Metadata(
author: "Claus"
Expand Down

0 comments on commit 1baeee5

Please sign in to comment.