Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arm IK circle color on dark mode #154

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/src/pages/arm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ class ArmPainterTop extends CustomPainter {
class ArmPainterSide extends CustomPainter {
/// The view model to pull data from.
ArmModel model;

/// Color to paint the radius in
Color radiusColor;

/// Constructor for the ArmPainterSide, takes in 3 angles
ArmPainterSide(this.model);
ArmPainterSide(this.model, this.radiusColor);

/// The smaller screen dimension.
late double screen;
Expand Down Expand Up @@ -120,7 +123,7 @@ class ArmPainterSide extends CustomPainter {
paintArm(canvas, size, ikCoordinates, opacity: 0.5);
}
final radiusPaint = Paint()
..color = Colors.black
..color = radiusColor
..style = PaintingStyle.stroke
..strokeWidth = 2;
final radius1 = length * (shoulderLength + elbowLength);
Expand Down Expand Up @@ -252,7 +255,7 @@ class ArmPage extends ReactiveWidget<ArmModel> {
child: GestureDetector(
onTap: model.sendIK,
child: CustomPaint(
painter: ArmPainterSide(model),
painter: ArmPainterSide(model, context.colorScheme.onSurface),
),
),
),
Expand Down
Loading