mirror of
https://github.com/DungeonPaper/dungeon-paper-app.git
synced 2026-05-18 01:59:04 +00:00
fix: roll button colors
This commit is contained in:
@@ -36,13 +36,16 @@ class RoundIconButton extends StatelessWidget {
|
||||
final theme = Theme.of(context);
|
||||
final colorScheme = theme.colorScheme;
|
||||
final bgColor = Color.alphaBlend(
|
||||
backgroundColor ?? Colors.transparent, colorScheme.primary);
|
||||
backgroundColor ?? Colors.transparent,
|
||||
colorScheme.secondary,
|
||||
);
|
||||
final fgColor = Color.alphaBlend(
|
||||
foregroundColor ?? Colors.transparent,
|
||||
(ThemeData.estimateBrightnessForColor(bgColor) == Brightness.light
|
||||
? Colors.black
|
||||
: Colors.white),
|
||||
);
|
||||
debugPrint('fgColor: $fgColor, bgColor: $bgColor');
|
||||
return ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -53,7 +56,7 @@ class RoundIconButton extends StatelessWidget {
|
||||
onPressed: onPressed,
|
||||
child: IconTheme.merge(
|
||||
child: icon,
|
||||
data: IconThemeData(size: size / 2),
|
||||
data: IconThemeData(size: size / 2, color: fgColor),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class DynamicActionCardMini extends StatelessWidget {
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface
|
||||
.withOpacity(0.3),
|
||||
.withValues(alpha: 0.3),
|
||||
),
|
||||
child: starred
|
||||
? starredIcon ??
|
||||
@@ -204,4 +204,4 @@ class RectClipper extends CustomClipper<Rect> {
|
||||
bool shouldReclip(covariant RectClipper oldClipper) =>
|
||||
oldClipper.size.width != size.width ||
|
||||
oldClipper.size.height != size.height;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user