put tiny bit of padding around the board container

This commit is contained in:
Eric House 2016-09-04 21:57:58 -07:00
parent b1ce992d23
commit 5e90ed0073

View file

@ -77,7 +77,9 @@ public class BoardContainer extends ViewGroup {
if ( 0 != width || 0 != height ) {
setForPortrait( width, height );
figureBounds( 0, 0, width, height );
// Add a margin of half a percent of the lesser of width,height
int padding = (Math.min( width, height ) * 5) / 1000;
figureBounds( padding, padding, width-(padding*2), height-(padding*2) );
// Measure any toolbar first so we can take extra space for the
// board