diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift index 65f22061..0195563b 100644 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift +++ b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift @@ -152,6 +152,7 @@ extension Binding { // Ref: https://stackoverflow.com/a/63217861 @available(macOS 10.15, *) +@available(macOS, obsoleted: 11) struct Tooltip: NSViewRepresentable { let tooltip: String @@ -166,8 +167,9 @@ struct Tooltip: NSViewRepresentable { } @available(macOS 10.15, *) +@available(macOS, obsoleted: 11) extension View { - public func toolTip(_ tooltip: String) -> some View { + public func help(_ tooltip: String) -> some View { overlay(Tooltip(tooltip: tooltip)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift index b0b68f7c..42406f83 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift @@ -48,13 +48,8 @@ struct VwrPrefPaneCassette: View { SSPreferences.Section(title: "", bottomDivider: true) { Text(LocalizedStringKey("Choose your desired cassette file path. Will be omitted if invalid.")) HStack { - if #available(macOS 11.0, *) { - TextField(fdrCassetteDataDefault, text: $tbxCassettePath).disabled(true) - .help(tbxCassettePath) - } else { - TextField(fdrCassetteDataDefault, text: $tbxCassettePath).disabled(true) - .toolTip(tbxCassettePath) - } + TextField(fdrCassetteDataDefault, text: $tbxCassettePath).disabled(true) + .help(tbxCassettePath) Button { Self.dlgOpenFile.title = NSLocalizedString( "Choose your desired cassette file path.", comment: "" diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift index 3f65c187..a0a2aa7d 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift @@ -60,13 +60,8 @@ struct VwrPrefPaneDictionary: View { SSPreferences.Section(title: "", bottomDivider: true) { Text(LocalizedStringKey("Choose your desired user data folder path. Will be omitted if invalid.")) HStack { - if #available(macOS 11.0, *) { - TextField(fdrUserDataDefault, text: $tbxUserDataPathSpecified).disabled(true) - .help(tbxUserDataPathSpecified) - } else { - TextField(fdrUserDataDefault, text: $tbxUserDataPathSpecified).disabled(true) - .toolTip(tbxUserDataPathSpecified) - } + TextField(fdrUserDataDefault, text: $tbxUserDataPathSpecified).disabled(true) + .help(tbxUserDataPathSpecified) Button { Self.dlgOpenPath.title = NSLocalizedString( "Choose your desired user data folder.", comment: ""