@@ -18,48 +18,27 @@ extension PropertiesPanel {
1818 VStack ( alignment: . leading, spacing: Layout . itemSpacing) {
1919 SectionHeader ( icon: " waveform " , title: " Generate " )
2020
21- HStack ( spacing: 8 ) {
21+ VStack ( alignment : . leading , spacing: Layout . compactSpacing ) {
2222 Text ( " Model " )
2323 . font ( . system( size: 12 ) )
2424 . foregroundStyle ( ReframedColors . secondaryText)
25- . frame ( width: captionLabelWidth, alignment: . leading)
26- SelectButton ( label: selectedModelLabel) { dismiss in
27- VStack ( spacing: 2 ) {
28- ForEach ( WhisperModel . allCases) { model in
29- let downloaded = WhisperModelManager . shared. isDownloaded ( model)
30- Button {
31- editorState. captionModel = model. rawValue
32- dismiss ( )
33- } label: {
34- HStack {
35- Text ( model. label)
36- . font ( . system( size: 12 ) )
37- Spacer ( )
38- if editorState. captionModel == model. rawValue {
39- Image ( systemName: " checkmark " )
40- . font ( . system( size: 10 , weight: . semibold) )
41- } else if !downloaded {
42- Image ( systemName: " arrow.down.circle " )
43- . font ( . system( size: 10 ) )
44- . foregroundStyle ( ReframedColors . dimLabel)
45- }
46- }
47- . padding ( . horizontal, 8 )
48- . padding ( . vertical, 6 )
49- . contentShape ( Rectangle ( ) )
50- }
51- . buttonStyle ( . plain)
52- }
53- }
54- . padding ( 4 )
55- . frame ( width: 220 )
56- }
25+ SegmentPicker (
26+ items: WhisperModel . allCases,
27+ label: { $0. shortLabel } ,
28+ selection: Binding (
29+ get: { WhisperModel ( rawValue: editorState. captionModel) ?? . base } ,
30+ set: { editorState. captionModel = $0. rawValue }
31+ )
32+ )
5733 }
5834
5935 if let model = WhisperModel ( rawValue: editorState. captionModel) {
6036 Text ( model. description)
6137 . font ( . system( size: 11 ) )
6238 . foregroundStyle ( ReframedColors . dimLabel)
39+ . lineLimit ( 2 )
40+ . fixedSize ( horizontal: false , vertical: true )
41+ . frame ( minHeight: 28 , alignment: . top)
6342 }
6443
6544 HStack ( spacing: 8 ) {
@@ -144,10 +123,6 @@ extension PropertiesPanel {
144123 }
145124 }
146125
147- private var selectedModelLabel : String {
148- WhisperModel ( rawValue: editorState. captionModel) ? . shortLabel ?? " Base "
149- }
150-
151126 private var transcriptionStatusText : String {
152127 let pct = Int ( editorState. transcriptionProgress * 100 )
153128 if editorState. transcriptionProgress < 0.15 {
0 commit comments