From 9d6f31c283852e94d714c32470e97c7e7eb65eda Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 16 Jan 2022 17:58:59 +0100 Subject: [PATCH] use a bit bigger icon at Enter --- .../com/simplemobiletools/keyboard/views/MyKeyboardView.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt index 328b14e..985d6b2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -626,7 +626,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut val drawableX = (key.width - padding.left - padding.right - key.icon!!.intrinsicWidth) / 2 + padding.left val drawableY = (key.height - key.icon!!.intrinsicHeight) / 2 canvas.translate(drawableX.toFloat(), drawableY.toFloat()) - key.icon!!.setBounds(0, 0, key.icon!!.intrinsicWidth, key.icon!!.intrinsicHeight) + + if (key.codes.firstOrNull() == MyKeyboard.KEYCODE_ENTER) { + key.icon!!.setBounds(0, 0, (key.icon!!.intrinsicWidth * 1.2).toInt(), (key.icon!!.intrinsicHeight * 1.2).toInt()) + } else { + key.icon!!.setBounds(0, 0, key.icon!!.intrinsicWidth, key.icon!!.intrinsicHeight) + } key.icon!!.draw(canvas) canvas.translate(-drawableX.toFloat(), -drawableY.toFloat()) }