From 535752b4223d70b4b2104083c8574d31dbd22069 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 8 Jan 2022 18:10:45 +0100 Subject: [PATCH] removing some padding from key icons to make them centered --- .../com/simplemobiletools/keyboard/views/MyKeyboardView.kt | 2 +- 1 file changed, 1 insertion(+), 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 31208f8..e1ad169 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -608,7 +608,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut paint.setShadowLayer(0f, 0f, 0f, 0) } else if (key.icon != null) { val drawableX = (key.width - padding.left - padding.right - key.icon.intrinsicWidth) / 2 + padding.left - val drawableY = (key.height - padding.top - padding.bottom - key.icon.intrinsicHeight) / 2 + paddingTop + 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) key.icon.draw(canvas)