fix(settings): select Mornye desktop categories with a quiet gray fill

The accent fill put black labels and colored tiles on red; the selection now
matches the app sidebar.
This commit is contained in:
zarzet committed 2026-10-20 18:14:05 +07:00
1 parent e8de7b758c
commit 77e4a421d7
1 file changed
+16 -5
+16 -5
View File
@@ -907,8 +907,14 @@ class _CategoryRow extends StatelessWidget {
final colorScheme = Theme.of(context).colorScheme;
final textTheme = Theme.of(context).textTheme;
final radius = BorderRadius.circular(mornye ? 8 : 28);
final foreground = selected
? (mornye ? colorScheme.onPrimary : colorScheme.onSecondaryContainer)
// Mornye selects with the app sidebar's quiet gray fill, so the colored
// category tiles keep their own color.
final dark = colorScheme.brightness == Brightness.dark;
final mornyeFill = colorScheme.onSurface.withValues(
alpha: dark ? 0.12 : 0.08,
);
final foreground = selected && !mornye
? colorScheme.onSecondaryContainer
: colorScheme.onSurface;
final secondary = selected
? foreground.withValues(alpha: 0.8)
@@ -920,11 +926,14 @@ class _CategoryRow extends StatelessWidget {
selected: selected,
child: Material(
color: selected
? (mornye ? colorScheme.primary : colorScheme.secondaryContainer)
? (mornye ? mornyeFill : colorScheme.secondaryContainer)
: Colors.transparent,
borderRadius: radius,
child: InkWell(
borderRadius: radius,
hoverColor: mornye
? colorScheme.onSurface.withValues(alpha: 0.05)
: null,
onTap: onTap,
child: ConstrainedBox(
constraints: BoxConstraints(minHeight: mornye ? 36 : 56),
@@ -953,8 +962,10 @@ class _CategoryRow extends StatelessWidget {
: textTheme.labelLarge)
?.copyWith(
color: foreground,
fontWeight: selected && !mornye
? FontWeight.w700
fontWeight: selected
? (mornye
? FontWeight.w600
: FontWeight.w700)
: null,
),
maxLines: 1,