mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-12-02 16:32:59 +01:00
DroidFish: Removed the padding around the chess board. Makes it slightly larger.
This commit is contained in:
parent
656db44a6b
commit
1569ac3731
|
@ -13,7 +13,8 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent"
|
||||||
|
android:paddingLeft="1dp">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="1dp">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/status"
|
android:id="@+id/status"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -346,10 +346,10 @@ public class ChessBoard extends View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getWidth(int sqSize) { return sqSize * 8 + 4; }
|
protected int getWidth(int sqSize) { return sqSize * 8; }
|
||||||
protected int getHeight(int sqSize) { return sqSize * 8 + 4; }
|
protected int getHeight(int sqSize) { return sqSize * 8; }
|
||||||
protected int getSqSizeW(int width) { return (width - 4) / 8; }
|
protected int getSqSizeW(int width) { return (width) / 8; }
|
||||||
protected int getSqSizeH(int height) { return (height - 4) / 8; }
|
protected int getSqSizeH(int height) { return (height) / 8; }
|
||||||
|
|
||||||
protected int getMaxHeightPercentage() { return 75; }
|
protected int getMaxHeightPercentage() { return 75; }
|
||||||
|
|
||||||
|
|
|
@ -39,16 +39,16 @@ public class ChessBoardEdit extends ChessBoard {
|
||||||
drawSquareLabels = true;
|
drawSquareLabels = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static int gap = 2;
|
private final static int gap = 4;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getWidth(int sqSize) { return sqSize * 8 + 4; }
|
protected int getWidth(int sqSize) { return sqSize * 8; }
|
||||||
@Override
|
@Override
|
||||||
protected int getHeight(int sqSize) { return sqSize * 10 + 4 + gap; }
|
protected int getHeight(int sqSize) { return sqSize * 10 + gap; }
|
||||||
@Override
|
@Override
|
||||||
protected int getSqSizeW(int width) { return (width - 4) / 8; }
|
protected int getSqSizeW(int width) { return (width) / 8; }
|
||||||
@Override
|
@Override
|
||||||
protected int getSqSizeH(int height) { return (height - 4 - gap) / 10; }
|
protected int getSqSizeH(int height) { return (height - gap) / 10; }
|
||||||
@Override
|
@Override
|
||||||
protected int getMaxHeightPercentage() { return 85; }
|
protected int getMaxHeightPercentage() { return 85; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user