From e0ac8c7ca9c670da8ae5c1f5a347393d84858300 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Thu, 27 Jun 2024 00:39:41 +0800 Subject: [PATCH] Format --- .../game_page/widgets/painters/board_painter.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ui/flutter_app/lib/game_page/widgets/painters/board_painter.dart b/src/ui/flutter_app/lib/game_page/widgets/painters/board_painter.dart index 969f7c944..efba9cbe2 100644 --- a/src/ui/flutter_app/lib/game_page/widgets/painters/board_painter.dart +++ b/src/ui/flutter_app/lib/game_page/widgets/painters/board_painter.dart @@ -137,7 +137,7 @@ class BoardPainter extends CustomPainter { List 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; @@ -171,6 +171,16 @@ class BoardPainter extends CustomPainter { .any((List 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); } }