Skip to content

Commit

Permalink
Emulator view padding
Browse files Browse the repository at this point in the history
Margin Drawing fixes
  • Loading branch information
dvhh committed Apr 28, 2015
1 parent ddd17db commit 1b1ccab
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1586,9 +1586,12 @@ protected void onDraw(Canvas canvas) {
mBackgroundDrawable.draw(canvas);

//backgroundPaint.setAlpha(255 - mBackgroundAlpha);
canvas.drawRect(0,0, w, mTopOfScreenMargin, backgroundPaint);
canvas.drawRect(0,mVisibleRows*mCharacterHeight+mTopOfScreenMargin, w, h, backgroundPaint);
canvas.drawRect(mVisibleColumns*mCharacterWidth,mTopOfScreenMargin,w,mVisibleRows*mCharacterHeight+mTopOfScreenMargin,backgroundPaint);
float consoleWidth=mColumns*mCharacterWidth;
int consoleHeight=mRows*mCharacterHeight;
canvas.drawRect(0, 0, w, mTopOfScreenMargin + getPaddingTop(), backgroundPaint); //top
canvas.drawRect(0, consoleHeight+getPaddingTop()+mTopOfScreenMargin, w, h, backgroundPaint); //bottom
canvas.drawRect(0,mTopOfScreenMargin + getPaddingTop(),getPaddingLeft(),consoleHeight+getPaddingTop()+mTopOfScreenMargin,backgroundPaint);
canvas.drawRect(consoleWidth+getPaddingLeft(),mTopOfScreenMargin + getPaddingTop(),w,consoleHeight+getPaddingTop()+mTopOfScreenMargin,backgroundPaint);

}
float x = -mLeftColumn * mCharacterWidth + getPaddingLeft();
Expand Down

0 comments on commit 1b1ccab

Please sign in to comment.