@@ -339,6 +339,7 @@ private var headerBar: some View { DragHost { headerContent }.zIndex(2) }
339339 progressActive: model. ttsProgress != nil ,
340340 duration: model. ttsDuration,
341341 elapsed: model. ttsElapsed,
342+ tooltipsEnabled: model. tooltipsEnabled,
342343 onBack15: { model. skipBackward15 ( ) } ,
343344 onPlayPause: { model. toggleSpeakResponse ( ) } ,
344345 onForward15: { model. skipForward15 ( ) } ,
@@ -1208,6 +1209,7 @@ private struct TTSControlsView: View, Equatable {
12081209 let progressActive : Bool
12091210 let duration : TimeInterval
12101211 let elapsed : TimeInterval
1212+ let tooltipsEnabled : Bool
12111213 let onBack15 : ( ) -> Void
12121214 let onPlayPause : ( ) -> Void
12131215 let onForward15 : ( ) -> Void
@@ -1220,15 +1222,15 @@ private struct TTSControlsView: View, Equatable {
12201222
12211223 var body : some View {
12221224 HStack ( spacing: 8 ) {
1223- Button ( action: onBack15) { Image ( systemName: " gobackward.15 " ) } . buttonStyle ( . plain) . help ( " Back 15s (⇧⌘,) " )
1225+ Button ( action: onBack15) { Image ( systemName: " gobackward.15 " ) } . buttonStyle ( . plain) . help ( tooltipsEnabled ? " Back 15s (⇧⌘,) " : " " )
12241226 Button ( action: onPlayPause) {
12251227 HStack ( spacing: 6 ) {
12261228 Image ( systemName: isSpeaking ? " pause.circle " : " play.circle " )
12271229 Text ( isSpeaking ? " Pause (⌘;) " : " Play (⌘;) " )
12281230 }
1229- } . buttonStyle ( . plain) . help ( " Play/Pause TTS " )
1230- Button ( action: onForward15) { Image ( systemName: " goforward.15 " ) } . buttonStyle ( . plain) . help ( " Forward 15s (⇧⌘.) " )
1231- Button ( action: onToggleRate) { Text ( rateIndex == 0 ? " 1x " : ( rateIndex == 1 ? " 1.5x " : " 2x " ) ) } . buttonStyle ( . plain) . help ( " Toggle speed (⇧⌘;) " )
1231+ } . buttonStyle ( . plain) . help ( tooltipsEnabled ? " Play/Pause TTS " : " " )
1232+ Button ( action: onForward15) { Image ( systemName: " goforward.15 " ) } . buttonStyle ( . plain) . help ( tooltipsEnabled ? " Forward 15s (⇧⌘.) " : " " )
1233+ Button ( action: onToggleRate) { Text ( rateIndex == 0 ? " 1x " : ( rateIndex == 1 ? " 1.5x " : " 2x " ) ) } . buttonStyle ( . plain) . help ( tooltipsEnabled ? " Toggle speed (⇧⌘;) " : " " )
12321234 if progressActive {
12331235 ProgressView ( ) . controlSize ( . small) . scaleEffect ( 0.75 ) . frame ( width: 14 , height: 14 )
12341236 } else if duration > 0 {
@@ -1237,7 +1239,7 @@ private struct TTSControlsView: View, Equatable {
12371239 let eStr = String ( format: " %02d:%02d " , e / 60 , e % 60 )
12381240 let dStr = String ( format: " %02d:%02d " , d / 60 , d % 60 )
12391241 Text ( " \( eStr) / \( dStr) " ) . font ( . caption) . foregroundStyle ( . secondary)
1240- Button ( action: onRestart) { Image ( systemName: " gobackward " ) } . buttonStyle ( . plain) . help ( " Restart (⌘') " )
1242+ Button ( action: onRestart) { Image ( systemName: " gobackward " ) } . buttonStyle ( . plain) . help ( tooltipsEnabled ? " Restart (⌘') " : " " )
12411243 }
12421244 }
12431245 . allowsHitTesting ( isInteractive)
0 commit comments