@@ -19,59 +19,59 @@ public struct LogEntriesGrid: View {
19
19
}
20
20
21
21
public var body : some View {
22
- ScrollView ( [ . vertical, . horizontal] ) {
23
- Grid ( alignment: . leadingFirstTextBaseline, horizontalSpacing: 0 , verticalSpacing: 0 ) {
24
- // Table header row
25
- GridRow {
26
- Text ( " View " )
27
- Text ( " Proposal " )
28
- Text ( " Response " )
29
- }
30
- . font ( . headline)
22
+ Grid (
23
+ alignment: . leadingFirstTextBaseline,
24
+ horizontalSpacing: 0 ,
25
+ verticalSpacing: 0
26
+ ) {
27
+ // Table header row
28
+ GridRow {
29
+ Text ( " View " )
30
+ Text ( " Proposal " )
31
+ Text ( " Response " )
32
+ }
33
+ . bold ( )
34
+ . padding ( . vertical, Self . tableRowVerticalPadding)
35
+ . padding ( . horizontal, Self . tableRowHorizontalPadding)
36
+
37
+ // Table header separator line
38
+ Rectangle ( ) . fill ( . secondary)
39
+ . frame ( height: 1 )
40
+ . gridCellUnsizedAxes ( . horizontal)
31
41
. padding ( . vertical, Self . tableRowVerticalPadding)
32
42
. padding ( . horizontal, Self . tableRowHorizontalPadding)
33
43
34
- // Table header separator line
35
- Rectangle ( ) . fill ( . secondary)
36
- . frame ( height: 1 )
37
- . gridCellUnsizedAxes ( . horizontal)
38
- . padding ( . vertical, Self . tableRowVerticalPadding)
39
- . padding ( . horizontal, Self . tableRowHorizontalPadding)
44
+ // Table rows
45
+ ForEach ( logEntries) { item in
46
+ let isSelected = highlight == item. label
47
+ GridRow {
48
+ HStack ( spacing: 0 ) {
49
+ indentation ( level: item. indent)
50
+ Text ( item. label)
51
+ }
52
+ . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . leading)
40
53
41
- // Table rows
42
- ForEach ( logEntries) { item in
43
- let isSelected = highlight == item. label
44
- GridRow {
45
- HStack ( spacing: 0 ) {
46
- indentation ( level: item. indent)
47
- Text ( item. label)
48
- . font ( . body)
49
- }
54
+ Text ( item. proposal? . pretty ?? " … " )
55
+ . monospacedDigit ( )
56
+ . fixedSize ( )
50
57
. frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . leading)
51
58
52
- Text ( item. proposal? . pretty ?? " … " )
53
- . monospacedDigit ( )
54
- . fixedSize ( )
55
- . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . leading)
56
-
57
- Text ( item. response? . pretty ?? " … " )
58
- . monospacedDigit ( )
59
- . fixedSize ( )
60
- . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . leading)
61
- }
62
- . font ( . callout)
63
- . padding ( . vertical, Self . tableRowVerticalPadding)
64
- . padding ( . horizontal, Self . tableRowHorizontalPadding)
65
- . foregroundColor ( isSelected ? . white : nil )
66
- . background ( isSelected ? Color . accentColor : . clear)
67
- . contentShape ( Rectangle ( ) )
68
- . onTapGesture {
69
- highlight = isSelected ? nil : item. label
70
- }
59
+ Text ( item. response? . pretty ?? " … " )
60
+ . monospacedDigit ( )
61
+ . fixedSize ( )
62
+ . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . leading)
63
+ }
64
+ . padding ( . vertical, Self . tableRowVerticalPadding)
65
+ . padding ( . horizontal, Self . tableRowHorizontalPadding)
66
+ . foregroundColor ( isSelected ? . white : nil )
67
+ . background ( isSelected ? Color . accentColor : . clear)
68
+ . contentShape ( Rectangle ( ) )
69
+ . onTapGesture {
70
+ highlight = isSelected ? nil : item. label
71
71
}
72
72
}
73
- . padding ( . vertical, 8 )
74
73
}
74
+ . padding ( . vertical, 8 )
75
75
}
76
76
77
77
private func indentation( level: Int ) -> some View {
0 commit comments