4172 color inconsistency of activity elements (#4247)

* activity menu color consistency

And some sizing changes, made the stats button box much smaller

* revert activity button size changes

Also make text bigger to fill box, and make menu/summary buttons solid colors so the shadow under the button works.
This commit is contained in:
avashilling 2025-10-06 09:15:41 -04:00 committed by GitHub
parent 997d0d3706
commit df4cda0875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 11 deletions

View file

@ -176,7 +176,9 @@ class _ActivityStatsButtonState extends State<ActivityStatsButton> {
),
borderRadius: BorderRadius.circular(12),
color: _xpCount > 0
? AppConfig.gold.withAlpha(180)
? (theme.brightness == Brightness.light
? AppConfig.yellowLight
: Color.lerp(AppConfig.gold, Colors.black, 0.3)!)
: theme.colorScheme.surface,
depressed: _xpCount <= 0 || widget.controller.showActivityDropdown,
child: AnimatedContainer(
@ -186,7 +188,9 @@ class _ActivityStatsButtonState extends State<ActivityStatsButton> {
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: _xpCount > 0
? AppConfig.gold.withAlpha(180)
? theme.brightness == Brightness.light
? AppConfig.yellowLight
: Color.lerp(AppConfig.gold, Colors.black, 0.3)!
: theme.colorScheme.surface,
borderRadius: BorderRadius.circular(12),
),
@ -195,8 +199,14 @@ class _ActivityStatsButtonState extends State<ActivityStatsButton> {
: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_StatsBadge(icon: Icons.radar, value: "$_xpCount XP"),
_StatsBadge(icon: Symbols.dictionary, value: "$_vocabCount"),
_StatsBadge(
icon: Icons.radar,
value: "$_xpCount XP",
),
_StatsBadge(
icon: Symbols.dictionary,
value: "$_vocabCount",
),
_StatsBadge(
icon: Symbols.toys_and_games,
value: "$_grammarCount",
@ -221,8 +231,8 @@ class _StatsBadge extends StatelessWidget {
final theme = Theme.of(context);
final screenWidth = MediaQuery.of(context).size.width;
final baseStyle = theme.textTheme.bodyMedium;
final double fontSize = (screenWidth < 400) ? 10 : 14;
final double iconSize = (screenWidth < 400) ? 14 : 18;
final double fontSize = (screenWidth < 400) ? 14 : 18;
final double iconSize = (screenWidth < 400) ? 18 : 22;
return Row(
mainAxisSize: MainAxisSize.min,
children: [

View file

@ -123,12 +123,10 @@ class ButtonControlledCarouselView extends StatelessWidget {
margin: const EdgeInsets.only(right: 5.0),
padding: const EdgeInsets.all(12.0),
decoration: ShapeDecoration(
color: AppConfig.goldLight.withAlpha(100),
color: Theme.of(context).brightness == Brightness.light
? AppConfig.yellowLight
: Color.lerp(AppConfig.gold, Colors.black, 0.3),
shape: RoundedRectangleBorder(
side: const BorderSide(
width: 0.20,
color: AppConfig.gold,
),
borderRadius: BorderRadius.circular(12),
),
),