ui: changed whiskey mark looks

This commit is contained in:
Mikkeli Matlock
2026-02-02 19:31:16 +09:00
parent 18fbc63281
commit 5cb0be0aaa

View File

@@ -48,8 +48,9 @@ class WhiskeyMark extends StatelessWidget {
roll: roll ?? 0, roll: roll ?? 0,
pitch: pitch ?? 0, pitch: pitch ?? 0,
lineColor: theme.foreground, lineColor: theme.foreground,
skyColor: theme.subdued.withValues(alpha: 0.2), borderWeight: 8,
groundColor: theme.highlight.withValues(alpha: 0.3), skyColor: theme.subdued,
groundColor: theme.background,
), ),
), ),
), ),
@@ -61,9 +62,9 @@ class WhiskeyMark extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
'R: ${_formatAngle(roll)}', 'Roll: ${_formatAngle(roll)}',
style: TextStyle( style: TextStyle(
fontSize: fontSize, fontSize: fontSize * 0.8,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFeatures: const [FontFeature.tabularFigures()], fontFeatures: const [FontFeature.tabularFigures()],
color: theme.foreground, color: theme.foreground,
@@ -73,7 +74,7 @@ class WhiskeyMark extends StatelessWidget {
Text( Text(
'P: ${_formatAngle(pitch)}', 'P: ${_formatAngle(pitch)}',
style: TextStyle( style: TextStyle(
fontSize: fontSize, fontSize: fontSize * 0.8,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFeatures: const [FontFeature.tabularFigures()], fontFeatures: const [FontFeature.tabularFigures()],
color: theme.subdued, color: theme.subdued,
@@ -82,8 +83,6 @@ class WhiskeyMark extends StatelessWidget {
], ],
), ),
SizedBox(height: size * 0.02),
// Label // Label
Text( Text(
'ATTITUDE', 'ATTITUDE',
@@ -110,6 +109,7 @@ class WhiskeyMark extends StatelessWidget {
class _HorizonPainter extends CustomPainter { class _HorizonPainter extends CustomPainter {
final double roll; final double roll;
final double pitch; final double pitch;
final double borderWeight;
final Color lineColor; final Color lineColor;
final Color skyColor; final Color skyColor;
final Color groundColor; final Color groundColor;
@@ -117,6 +117,7 @@ class _HorizonPainter extends CustomPainter {
_HorizonPainter({ _HorizonPainter({
required this.roll, required this.roll,
required this.pitch, required this.pitch,
required this.borderWeight,
required this.lineColor, required this.lineColor,
required this.skyColor, required this.skyColor,
required this.groundColor, required this.groundColor,
@@ -191,7 +192,7 @@ class _HorizonPainter extends CustomPainter {
// Draw circle border // Draw circle border
final borderPaint = Paint() final borderPaint = Paint()
..color = lineColor.withValues(alpha: 0.5) ..color = lineColor.withValues(alpha: 0.5)
..strokeWidth = 1.5 ..strokeWidth = borderWeight
..style = PaintingStyle.stroke; ..style = PaintingStyle.stroke;
canvas.drawCircle(center, radius - 1, borderPaint); canvas.drawCircle(center, radius - 1, borderPaint);
@@ -199,7 +200,7 @@ class _HorizonPainter extends CustomPainter {
// Draw center reference mark (fixed, doesn't rotate) // Draw center reference mark (fixed, doesn't rotate)
final refPaint = Paint() final refPaint = Paint()
..color = lineColor ..color = lineColor
..strokeWidth = 2 ..strokeWidth = borderWeight * 0.8
..style = PaintingStyle.stroke; ..style = PaintingStyle.stroke;
// Small wings // Small wings
@@ -213,8 +214,12 @@ class _HorizonPainter extends CustomPainter {
Offset(center.dx + radius * 0.3, center.dy), Offset(center.dx + radius * 0.3, center.dy),
refPaint, refPaint,
); );
// Center dot // Center vertical line
canvas.drawCircle(center, 3, Paint()..color = lineColor); canvas.drawLine(
Offset(center.dx, center.dy - radius * 0.05),
Offset(center.dx, center.dy + radius * 0.1),
refPaint,
);
canvas.restore(); canvas.restore();
} }