@@ -71,46 +71,51 @@ struct SettingsView: View {
71
71
72
72
HStack ( alignment: . center) {
73
73
Text ( " \( viewMode. rawValue. capitalized) s before: " ) . frame ( width: 90 , alignment: . trailing)
74
- TextField ( " " , value: $daysBefore, format: . number)
75
- . textFieldStyle ( RoundedBorderTextFieldStyle ( ) )
76
- . disableAutocorrection ( true )
77
- . textContentType ( . password)
78
- . frame ( width: 40 )
79
- . frame ( alignment: . center)
80
- . multilineTextAlignment ( . trailing)
81
- . focusable ( false )
82
- // .disabled(true)
83
-
84
- Stepper ( " " , onIncrement: {
85
- if viewMode == . week && daysBefore < 50 {
86
- daysBefore += 5
87
- } else if viewMode == . day && daysBefore < 10 {
88
- daysBefore += 1
74
+ HStack {
75
+ HStack ( spacing: 0 ) {
76
+ Text ( String ( daysBefore) )
77
+ // TextField("", value: $daysBefore, format: .number)
78
+ // .textFieldStyle(RoundedBorderTextFieldStyle())
79
+ // .disableAutocorrection(true)
80
+ // .textContentType(.password)
81
+ // .frame(width: 40)
82
+ // .frame(alignment: .center)
83
+ // .multilineTextAlignment(.trailing)
84
+ // .focusable(false)
85
+ // .disabled(true)
86
+
87
+ Stepper ( " " , onIncrement: {
88
+ if viewMode == . week && daysBefore < 50 {
89
+ daysBefore += 5
90
+ } else if viewMode == . day && daysBefore < 10 {
91
+ daysBefore += 1
92
+ }
93
+ } , onDecrement: {
94
+ if viewMode == . week && daysBefore > 0 {
95
+ daysBefore -= 5
96
+ } else if viewMode == . day && daysBefore > 0 {
97
+ daysBefore -= 1
98
+ } } )
89
99
}
90
- } , onDecrement: {
91
- if viewMode == . week && daysBefore > 0 {
92
- daysBefore -= 5
93
- } else if viewMode == . day && daysBefore > 0 {
94
- daysBefore -= 1
95
- } } )
96
-
97
-
98
- // TextField("", value: $daysBefore, format: .number)
99
- // .textFieldStyle(RoundedBorderTextFieldStyle())
100
- // .disableAutocorrection(true)
101
- // .textContentType(.password)
102
- // .frame(width: 40)
103
- // .frame(alignment: .center)
104
- // .multilineTextAlignment(.trailing)
105
-
106
- Button ( action: {
107
- appDelegate. redrawBarItem ( )
108
- } ,
109
- label: {
110
- HoverableLabel ( iconName: " arrow.triangle.2.circlepath " )
111
- } )
112
- . buttonStyle ( . borderless)
113
- . help ( " Re-draw " )
100
+ . padding ( . leading, 2 )
101
+
102
+ // TextField("", value: $daysBefore, format: .number)
103
+ // .textFieldStyle(RoundedBorderTextFieldStyle())
104
+ // .disableAutocorrection(true)
105
+ // .textContentType(.password)
106
+ // .frame(width: 40)
107
+ // .frame(alignment: .center)
108
+ // .multilineTextAlignment(.trailing)
109
+
110
+ Button ( action: {
111
+ appDelegate. redrawBarItem ( )
112
+ } ,
113
+ label: {
114
+ HoverableLabel ( iconName: " arrow.triangle.2.circlepath " )
115
+ } )
116
+ . buttonStyle ( . borderless)
117
+ . help ( " Re-draw " )
118
+ }
114
119
}
115
120
116
121
HStack ( alignment: . center) {
0 commit comments