couple smaller updates

This commit is contained in:
tibbi 2017-01-19 22:12:49 +01:00
parent 7b5940e3ab
commit 543ef711b7
2 changed files with 10 additions and 5 deletions

View File

@ -107,18 +107,23 @@ public class MyCanvas extends View {
canvas.drawPath(mPath, mPaint);
if (mIsStrokeWidthBarEnabled && !mIsSaving) {
drawPreviewDot(canvas);
drawPreviewCircle(canvas);
}
}
private void drawPreviewDot(Canvas canvas) {
private void drawPreviewCircle(Canvas canvas) {
Resources res = getResources();
mPaint.setStyle(Paint.Style.FILL);
canvas.drawCircle(getWidth() / 2, getHeight() - res.getDimension(R.dimen.preview_dot_offset_y), mPaintOptions.strokeWidth / 2, mPaint);
float y = getHeight() - res.getDimension(R.dimen.preview_dot_offset_y);
canvas.drawCircle(getWidth() / 2, y, mPaintOptions.strokeWidth / 2, mPaint);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(Utils.shouldUseWhite(mPaintOptions.color) ? Color.WHITE : Color.BLACK);
mPaint.setStrokeWidth(res.getDimension(R.dimen.preview_dot_stroke_size));
canvas.drawCircle(getWidth() / 2, getHeight() - res.getDimension(R.dimen.preview_dot_offset_y), (mPaintOptions.strokeWidth + res.getDimension(R.dimen.preview_dot_stroke_size)) / 2, mPaint);
y = getHeight() - res.getDimension(R.dimen.preview_dot_offset_y);
float radius = (mPaintOptions.strokeWidth + res.getDimension(R.dimen.preview_dot_stroke_size)) / 2;
canvas.drawCircle(getWidth() / 2, y, radius, mPaint);
changePaint(mPaintOptions);
}

View File

@ -6,7 +6,7 @@
<dimen name="social_logo">40dp</dimen>
<dimen name="settings_padding">8dp</dimen>
<dimen name="stroke_bar_size">150dp</dimen>
<dimen name="preview_dot_stroke_size">2dp</dimen>
<dimen name="preview_dot_stroke_size">1dp</dimen>
<dimen name="preview_dot_offset_y">70dp</dimen>
<dimen name="normal_text_size">14sp</dimen>