mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-01-31 10:24:45 +01:00
removing some padding from key icons to make them centered
This commit is contained in:
parent
de7f1033d8
commit
535752b422
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user