File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Core/Sources/SuggestionWidget Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -101,18 +101,19 @@ struct CodeBlock: View {
101101 @ObservedObject var viewModel : SuggestionPanelViewModel
102102
103103 var body : some View {
104- LazyVGrid ( columns: [
105- GridItem ( . fixed( 30 ) , alignment: . top) ,
106- GridItem ( . flexible( ) ) ,
107- ] , spacing: 4 ) {
104+ VStack {
108105 ForEach ( 0 ..< viewModel. suggestion. code. endIndex, id: \. self) { index in
109- Text ( " \( index + viewModel. suggestion. startLineIndex + 1 ) " )
110- . foregroundColor ( Color . white. opacity ( 0.6 ) )
111- Text ( AttributedString ( viewModel. suggestion. code [ index] ) )
112- . foregroundColor ( . white. opacity ( 0.1 ) )
113- . frame ( maxWidth: . infinity, alignment: . leading)
114- . multilineTextAlignment ( . leading)
115- . lineSpacing ( 4 )
106+ HStack ( alignment: . firstTextBaseline) {
107+ Text ( " \( index + viewModel. suggestion. startLineIndex + 1 ) " )
108+ . multilineTextAlignment ( . trailing)
109+ . foregroundColor ( Color . white. opacity ( 0.6 ) )
110+ . frame ( minWidth: 40 )
111+ Text ( AttributedString ( viewModel. suggestion. code [ index] ) )
112+ . foregroundColor ( . white. opacity ( 0.1 ) )
113+ . frame ( maxWidth: . infinity, alignment: . leading)
114+ . multilineTextAlignment ( . leading)
115+ . lineSpacing ( 4 )
116+ }
116117 }
117118 }
118119 . foregroundColor ( . white)
You can’t perform that action at this time.
0 commit comments