@@ -24,7 +24,7 @@ constexpr int IMAGE_SIZE = 30;
24
24
constexpr double PI = 3.14159 ;
25
25
26
26
// padding size based on character height
27
- constexpr double PADDING_FACTOR = 1.1 ;
27
+ constexpr double PADDING_FACTOR = PLATFORM_PADDING ;
28
28
29
29
// maximum keyboard height as based on screen height
30
30
constexpr double MAX_HEIGHT_FACTOR = 0.48 ;
@@ -78,14 +78,14 @@ constexpr RawKey KEYS[MAX_ROWS][MAX_COLS] = {
78
78
},
79
79
// ASDF
80
80
{
81
- {K_a, K_COMMA, K_SLASH , K_A},
82
- {K_s, K_EQUALS, K_HASH , K_S},
83
- {K_d, K_LPAREN, K_SEMICOLON , K_D},
84
- {K_f, K_RPAREN, K_QUESTION , K_F},
85
- {K_g, K_QUOTE, K_AMPERSAND , K_G},
86
- {K_h, K_APOSTROPHE, K_DOLLAR , K_H},
87
- {K_j, K_PERIOD, K_EXCLAIM , K_J},
88
- {K_k, K_MINUS, K_AT , K_K},
81
+ {K_a, K_COMMA, K_HASH , K_A},
82
+ {K_s, K_EQUALS, K_SEMICOLON , K_S},
83
+ {K_d, K_LPAREN, K_QUESTION , K_D},
84
+ {K_f, K_RPAREN, K_AMPERSAND , K_F},
85
+ {K_g, K_QUOTE, K_DOLLAR , K_G},
86
+ {K_h, K_APOSTROPHE, K_EXCLAIM , K_H},
87
+ {K_j, K_PERIOD, K_AT , K_J},
88
+ {K_k, K_MINUS, K_SLASH , K_K},
89
89
{K_l, K_ASTERISK, K_BACKSLASH, K_L},
90
90
{K_NULL}
91
91
},
@@ -276,16 +276,17 @@ int Key::color(const KeypadTheme *theme) const {
276
276
void Key::draw (const KeypadTheme *theme, const KeypadDrawContext *context, bool pressed) const {
277
277
int rc = 5 ;
278
278
int pad = 2 ;
279
+ int pad_rc = pad + rc;
279
280
int rx = _x + _w - pad; // right x
280
281
int by = _y + _h - pad; // bottom y
281
- int lt = _x + rc + pad; // left x (after corner)
282
- int vt = _y + rc + pad; // top y (after corner)
282
+ int lt = _x + pad_rc; // left x (after corner)
283
+ int vt = _y + pad_rc; // top y (after corner)
283
284
int rt = rx - rc; // right x (before corner)
284
285
int bt = by - rc; // bottom y (before corner)
285
- int xcL = _x + rc + pad; // x center for left arcs
286
- int xcR = rx - rc; // x center for right arcs
287
- int ycT = _y + rc + pad; // y center for top arcs
288
- int ycB = by - rc; // y center for bottom arcs
286
+ int xcL = _x + pad_rc; // x center for left arcs
287
+ int xcR = rx - rc; // x center for right arcs
288
+ int ycT = _y + pad_rc; // y center for top arcs
289
+ int ycB = by - rc; // y center for bottom arcs
289
290
290
291
char keyChar = context->getKey (_key);
291
292
bool printable = _printable && keyChar != K_TAG;
0 commit comments