DroidFish: Removed the padding around the chess board. Makes it slightly larger.

This commit is contained in:
Peter Osterlund
2012-04-22 11:23:41 +00:00
parent 656db44a6b
commit 1569ac3731
4 changed files with 13 additions and 11 deletions

View File

@@ -346,10 +346,10 @@ public class ChessBoard extends View {
}
}
protected int getWidth(int sqSize) { return sqSize * 8 + 4; }
protected int getHeight(int sqSize) { return sqSize * 8 + 4; }
protected int getSqSizeW(int width) { return (width - 4) / 8; }
protected int getSqSizeH(int height) { return (height - 4) / 8; }
protected int getWidth(int sqSize) { return sqSize * 8; }
protected int getHeight(int sqSize) { return sqSize * 8; }
protected int getSqSizeW(int width) { return (width) / 8; }
protected int getSqSizeH(int height) { return (height) / 8; }
protected int getMaxHeightPercentage() { return 75; }

View File

@@ -39,16 +39,16 @@ public class ChessBoardEdit extends ChessBoard {
drawSquareLabels = true;
}
private final static int gap = 2;
private final static int gap = 4;
@Override
protected int getWidth(int sqSize) { return sqSize * 8 + 4; }
protected int getWidth(int sqSize) { return sqSize * 8; }
@Override
protected int getHeight(int sqSize) { return sqSize * 10 + 4 + gap; }
protected int getHeight(int sqSize) { return sqSize * 10 + gap; }
@Override
protected int getSqSizeW(int width) { return (width - 4) / 8; }
protected int getSqSizeW(int width) { return (width) / 8; }
@Override
protected int getSqSizeH(int height) { return (height - 4 - gap) / 10; }
protected int getSqSizeH(int height) { return (height - gap) / 10; }
@Override
protected int getMaxHeightPercentage() { return 85; }