Fix centering key icon when visual inset is specified

Change-Id: Iae9cb87cc341a88fab269b629aa45c77adf232be
main
Tadashi G. Takaoka 2011-07-20 19:05:27 -07:00
parent 8507589085
commit 6ffb827ad5
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
canvas.translate(-bgX, -bgY);
// Draw key top visuals.
final int keyWidth = key.mWidth;
final int keyWidth = key.mWidth - key.mVisualInsetsLeft - key.mVisualInsetsRight;
final int keyHeight = key.mHeight;
final float centerX = keyWidth * 0.5f;
final float centerY = keyHeight * 0.5f;