Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
calcitem committed Jun 26, 2024
1 parent 24ba53a commit e0ac8c7
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class BoardPainter extends CustomPainter {
List<Offset> offset, Canvas canvas, Paint paint, Size size) {
final double boardInnerLineWidth = DB().displaySettings.boardInnerLineWidth;
paint.strokeWidth =
boardInnerLineWidth * (isTablet(context) ? size.width ~/ 256 : 1);
boardInnerLineWidth * (isTablet(context) ? size.width ~/ 256 : 1) + 1;

if (!DB().ruleSettings.oneTimeUseMill) {
return;
Expand Down Expand Up @@ -171,6 +171,16 @@ class BoardPainter extends CustomPainter {
.any((List<int> otherMill) => listEquals(mill, otherMill));

paint.color = isShared ? mixedColor : defaultColor;

if (paint.color == DB().colorSettings.boardBackgroundColor ||
paint.color == DB().colorSettings.boardLineColor) {
if (defaultColor == DB().colorSettings.whitePieceColor) {
paint.color = Colors.red;
} else {
paint.color = Colors.blue;
}
}

canvas.drawPath(path, paint);
}
}
Expand Down

0 comments on commit e0ac8c7

Please sign in to comment.