9
9
import UIKit
10
10
11
11
// MARK: - Layout Style
12
- private let DefaultKeyboardLayoutStyle = KeyboardLayoutStyle (
12
+ public var DefaultKeyboardLayoutStyle = KeyboardLayoutStyle (
13
13
topPadding: 10 ,
14
14
bottomPadding: 5 ,
15
15
rowPadding: 13 ,
16
16
backgroundColor: UIColor ( red: 208.0 / 255.0 , green: 213.0 / 255.0 , blue: 219.0 / 255.0 , alpha: 1 ) )
17
17
18
18
// MARK: - Row Style
19
- private let DefaultKeyboardRowStyle = KeyboardRowStyle (
19
+ public var DefaultKeyboardRowStyle = KeyboardRowStyle (
20
20
leadingPadding: 5 ,
21
21
trailingPadding: 5 ,
22
22
buttonsPadding: 6 )
23
23
24
- private let DefaultKeyboardSecondRowStyle = KeyboardRowStyle (
24
+ public var DefaultKeyboardSecondRowStyle = KeyboardRowStyle (
25
25
leadingPadding: 20 ,
26
26
trailingPadding: 20 ,
27
27
buttonsPadding: 6 )
28
28
29
- private let DefaultKeyboardThirdRowStyle = KeyboardRowStyle (
29
+ public var DefaultKeyboardChildRowStyle = KeyboardRowStyle (
30
30
leadingPadding: 10 ,
31
31
trailingPadding: 10 ,
32
32
buttonsPadding: 6 )
33
33
34
34
// MARK: - Button Style
35
- private let DefaultKeyboardSpaceButtonStyle = KeyboardButtonStyle (
35
+ public var DefaultKeyboardSpaceButtonStyle = KeyboardButtonStyle (
36
36
font: UIFont . systemFontOfSize ( 15 ) ,
37
37
showsPopup: false )
38
38
39
- private let DefaultKeyboardGlobeButtonStyle = KeyboardButtonStyle (
39
+ public var DefaultKeyboardBackspaceButtonStyle = KeyboardButtonStyle (
40
40
backgroundColor: UIColor ( red: 180.0 / 255.0 , green: 188.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
41
41
imageSize: 20 ,
42
42
showsPopup: false )
43
43
44
- private let DefaultKeyboardDarkImageButtonStyle = KeyboardButtonStyle (
44
+ public var DefaultKeyboardShiftButtonStyle = KeyboardButtonStyle (
45
45
backgroundColor: UIColor ( red: 180.0 / 255.0 , green: 188.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
46
- imageSize: 18 ,
46
+ imageSize: 20 ,
47
47
showsPopup: false )
48
48
49
- private let DefaultKeyboardDarkButtonStyle = KeyboardButtonStyle (
50
- backgroundColor: UIColor ( red: 172.0 / 255.0 , green: 179.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
49
+ public var DefaultKeyboardGlobeButtonStyle = KeyboardButtonStyle (
50
+ backgroundColor: UIColor ( red: 180.0 / 255.0 , green: 188.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
51
+ imageSize: 20 ,
51
52
showsPopup: false )
52
53
53
- private let DefaultKeyboardReturnButtonStyle = KeyboardButtonStyle (
54
+ public var DefaultKeyboardReturnButtonStyle = KeyboardButtonStyle (
54
55
backgroundColor: UIColor ( red: 172.0 / 255.0 , green: 179.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
55
56
font: UIFont . systemFontOfSize ( 15 ) ,
56
57
showsPopup: false )
57
58
58
- private let DefaultKeyboardNumbersButtonStyle = KeyboardButtonStyle (
59
+ public var DefaultKeyboardNumbersButtonStyle = KeyboardButtonStyle (
59
60
backgroundColor: UIColor ( red: 180.0 / 255.0 , green: 188.0 / 255.0 , blue: 201.0 / 255.0 , alpha: 1 ) ,
60
61
font: UIFont . systemFontOfSize ( 15 ) ,
61
62
showsPopup: false )
62
63
63
- private let DefaultKeyboardKeyButtonStyle = KeyboardButtonStyle ( showsPopup: true )
64
+ public var DefaultKeyboardKeyButtonStyle = KeyboardButtonStyle ( showsPopup: true )
64
65
65
66
// MARK: - Identifier
66
67
public enum DefaultKeyboardIdentifier : String {
@@ -137,11 +138,11 @@ public enum DefaultKeyboardLayout {
137
138
characters: [
138
139
KeyboardButton (
139
140
type: . Image( UIImage ( named: toggled ? " shiftToggled " : " shiftToggledOnce " ) ) ,
140
- style: DefaultKeyboardDarkImageButtonStyle ,
141
+ style: DefaultKeyboardShiftButtonStyle ,
141
142
width: . Relative( percent: 0.13 ) ,
142
143
identifier: toggled ? DefaultKeyboardIdentifier . ShiftToggled. rawValue : DefaultKeyboardIdentifier . ShiftToggledOnce. rawValue) ,
143
144
KeyboardRow (
144
- style: DefaultKeyboardThirdRowStyle ,
145
+ style: DefaultKeyboardChildRowStyle ,
145
146
characters: [
146
147
KeyboardButton ( type: . Key( " Z " ) , style: DefaultKeyboardKeyButtonStyle) ,
147
148
KeyboardButton ( type: . Key( " X " ) , style: DefaultKeyboardKeyButtonStyle) ,
@@ -154,7 +155,7 @@ public enum DefaultKeyboardLayout {
154
155
) ,
155
156
KeyboardButton (
156
157
type: . Image( UIImage ( named: " backspace " ) ) ,
157
- style: DefaultKeyboardDarkImageButtonStyle ,
158
+ style: DefaultKeyboardBackspaceButtonStyle ,
158
159
width: . Relative( percent: 0.13 ) ,
159
160
identifier: DefaultKeyboardIdentifier . Backspace. rawValue) ,
160
161
]
@@ -225,11 +226,11 @@ public enum DefaultKeyboardLayout {
225
226
characters: [
226
227
KeyboardButton (
227
228
type: . Image( UIImage ( named: " shift " ) ) ,
228
- style: DefaultKeyboardDarkImageButtonStyle ,
229
+ style: DefaultKeyboardShiftButtonStyle ,
229
230
width: . Relative( percent: 0.13 ) ,
230
231
identifier: DefaultKeyboardIdentifier . Shift. rawValue) ,
231
232
KeyboardRow (
232
- style: DefaultKeyboardThirdRowStyle ,
233
+ style: DefaultKeyboardChildRowStyle ,
233
234
characters: [
234
235
KeyboardButton ( type: . Key( " z " ) , style: DefaultKeyboardKeyButtonStyle) ,
235
236
KeyboardButton ( type: . Key( " x " ) , style: DefaultKeyboardKeyButtonStyle) ,
@@ -242,7 +243,7 @@ public enum DefaultKeyboardLayout {
242
243
) ,
243
244
KeyboardButton (
244
245
type: . Image( UIImage ( named: " backspace " ) ) ,
245
- style: DefaultKeyboardDarkImageButtonStyle ,
246
+ style: DefaultKeyboardBackspaceButtonStyle ,
246
247
width: . Relative( percent: 0.13 ) ,
247
248
identifier: DefaultKeyboardIdentifier . Backspace. rawValue) ,
248
249
]
@@ -318,7 +319,7 @@ public enum DefaultKeyboardLayout {
318
319
width: . Relative( percent: 0.13 ) ,
319
320
identifier: DefaultKeyboardIdentifier . Symbols. rawValue) ,
320
321
KeyboardRow (
321
- style: DefaultKeyboardThirdRowStyle ,
322
+ style: DefaultKeyboardChildRowStyle ,
322
323
characters: [
323
324
KeyboardButton ( type: . Key( " . " ) , style: DefaultKeyboardKeyButtonStyle) ,
324
325
KeyboardButton ( type: . Key( " , " ) , style: DefaultKeyboardKeyButtonStyle) ,
@@ -329,7 +330,7 @@ public enum DefaultKeyboardLayout {
329
330
) ,
330
331
KeyboardButton (
331
332
type: . Image( UIImage ( named: " backspace " ) ) ,
332
- style: DefaultKeyboardDarkImageButtonStyle ,
333
+ style: DefaultKeyboardBackspaceButtonStyle ,
333
334
width: . Relative( percent: 0.13 ) ,
334
335
identifier: DefaultKeyboardIdentifier . Backspace. rawValue) ,
335
336
]
@@ -405,7 +406,7 @@ public enum DefaultKeyboardLayout {
405
406
width: . Relative( percent: 0.13 ) ,
406
407
identifier: DefaultKeyboardIdentifier . Numbers. rawValue) ,
407
408
KeyboardRow (
408
- style: DefaultKeyboardThirdRowStyle ,
409
+ style: DefaultKeyboardChildRowStyle ,
409
410
characters: [
410
411
KeyboardButton ( type: . Key( " . " ) , style: DefaultKeyboardKeyButtonStyle) ,
411
412
KeyboardButton ( type: . Key( " , " ) , style: DefaultKeyboardKeyButtonStyle) ,
@@ -416,7 +417,7 @@ public enum DefaultKeyboardLayout {
416
417
) ,
417
418
KeyboardButton (
418
419
type: . Image( UIImage ( named: " backspace " ) ) ,
419
- style: DefaultKeyboardDarkImageButtonStyle ,
420
+ style: DefaultKeyboardBackspaceButtonStyle ,
420
421
width: . Relative( percent: 0.13 ) ,
421
422
identifier: DefaultKeyboardIdentifier . Backspace. rawValue) ,
422
423
]
0 commit comments