diff options
| author | Jules Aguillon | 2021-12-30 00:52:50 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2021-12-30 00:52:50 +0100 |
| commit | 29367f127d8927b063c1f869646d489df83079be (patch) | |
| tree | 9baf3cbee781d4272a6e76c77cf9b6a7dfc47dca /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | 093a00c572a29d292bc6bbb09559611cb61e1331 (diff) | |
| download | unexpected-keyboard-29367f127d8927b063c1f869646d489df83079be.tar.gz unexpected-keyboard-29367f127d8927b063c1f869646d489df83079be.zip | |
Move the border radius from Config to Theme
Also, draw activated keys with a round border too.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 2edb745..10ec678 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -352,10 +352,8 @@ public class Keyboard2View extends View float keyW = _keyWidth * k.width - _config.keyHorizontalInterval; KeyDown keyDown = getKeyDown(k); _tmpRect.set(x, y, x + keyW, y + keyH); - if (keyDown != null) - canvas.drawRect(_tmpRect, _theme.keyDownBgPaint); - else - canvas.drawRoundRect(_tmpRect, _config.keyRound, _config.keyRound, _theme.keyBgPaint); + canvas.drawRoundRect(_tmpRect, _theme.keyBorderRadius, _theme.keyBorderRadius, + (keyDown != null) ? _theme.keyDownBgPaint : _theme.keyBgPaint); if (k.key0 != null) drawLabel(canvas, k.key0, keyW / 2f + x, (keyH + _theme.labelTextSize) / 2f + y, keyDown); float subPadding = _config.keyPadding; |
