small color update
This commit is contained in:
@@ -47,12 +47,15 @@ class _PreviewScreenState extends State<PreviewScreen> {
|
|||||||
final List<int> _manualBulletScores = [];
|
final List<int> _manualBulletScores = [];
|
||||||
|
|
||||||
Color _bulletColor = Colors.blue; // default fallback
|
Color _bulletColor = Colors.blue; // default fallback
|
||||||
double get _bulletOpacity => 0.8;
|
double get _bulletOpacity => 0.7;
|
||||||
Color get _bulletColorWithOpacity => _bulletColor.withOpacity(_bulletOpacity);
|
|
||||||
|
|
||||||
bool _isEditMode = false;
|
bool _isEditMode = false;
|
||||||
int? _selectedBulletIndexInEdit;
|
int? _selectedBulletIndexInEdit;
|
||||||
|
|
||||||
|
Color get _editColor => Colors.deepOrangeAccent;
|
||||||
|
Color get _activeColor => _isEditMode ? _editColor : _bulletColor;
|
||||||
|
Color get _activeColorWithOpacity => _activeColor.withOpacity(_bulletOpacity);
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -273,7 +276,7 @@ Future<String?> _showMismatchOptionsDialog(int detectedCount) async {
|
|||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () => Navigator.pop(context, 'manual'),
|
onPressed: () => Navigator.pop(context, 'manual'),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: _bulletColor,
|
backgroundColor: _activeColor,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@@ -365,7 +368,7 @@ void _manualScoreEntry() {
|
|||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.greenAccent[700],
|
backgroundColor: _bulletColor,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
@@ -923,11 +926,11 @@ Widget build(BuildContext context) {
|
|||||||
width: bulletSize,
|
width: bulletSize,
|
||||||
height: bulletSize,
|
height: bulletSize,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _bulletColorWithOpacity,
|
color: _activeColorWithOpacity,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: isSelectedForEdit
|
color: isSelectedForEdit
|
||||||
? Colors.red
|
? _bulletColor
|
||||||
: (!_isEditMode && isHighlighted)
|
: (!_isEditMode && isHighlighted)
|
||||||
? Colors.red
|
? Colors.red
|
||||||
: Colors.black,
|
: Colors.black,
|
||||||
@@ -1022,8 +1025,8 @@ Widget build(BuildContext context) {
|
|||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected
|
color: isSelected
|
||||||
? Colors.red[400]
|
? _editColor
|
||||||
: _bulletColor,
|
: _activeColor,
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(16),
|
bottomLeft: Radius.circular(16),
|
||||||
bottomRight: Radius.circular(16),
|
bottomRight: Radius.circular(16),
|
||||||
@@ -1074,7 +1077,7 @@ Widget build(BuildContext context) {
|
|||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: _bulletColor,
|
backgroundColor: _activeColor, // ← dynamic color depending on mode
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
|||||||
Reference in New Issue
Block a user