minor fixes
This commit is contained in:
parent
cd624979fb
commit
4dcfc7568f
8 changed files with 23 additions and 9 deletions
|
@ -58,6 +58,7 @@ class Themes {
|
|||
typography: _typography,
|
||||
// COMPONENT THEMES
|
||||
checkboxTheme: _checkboxTheme(colors),
|
||||
floatingActionButtonTheme: _floatingActionButtonTheme(colors),
|
||||
radioTheme: _radioTheme(colors),
|
||||
sliderTheme: _sliderTheme(colors),
|
||||
tooltipTheme: _tooltipTheme,
|
||||
|
@ -86,6 +87,13 @@ class Themes {
|
|||
);
|
||||
}
|
||||
|
||||
static FloatingActionButtonThemeData _floatingActionButtonTheme(ColorScheme colors) {
|
||||
return FloatingActionButtonThemeData(
|
||||
foregroundColor: colors.onPrimary,
|
||||
backgroundColor: colors.primary,
|
||||
);
|
||||
}
|
||||
|
||||
// adapted from M3 defaults
|
||||
static RadioThemeData _radioTheme(ColorScheme colors) => RadioThemeData(
|
||||
fillColor: MaterialStateProperty.resolveWith<Color>((states) {
|
||||
|
|
|
@ -30,7 +30,7 @@ class AboutTranslators extends StatelessWidget {
|
|||
static Widget buildBody(BuildContext context) {
|
||||
return _RandomTextSpanHighlighter(
|
||||
spans: Contributors.translators.map((v) => v.name).toList(),
|
||||
color: Theme.of(context).colorScheme.onPrimary,
|
||||
color: Theme.of(context).colorScheme.onBackground,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,13 @@ class FilterBar extends StatefulWidget {
|
|||
static const double preferredHeight = AvesFilterChip.minChipHeight + verticalPadding;
|
||||
|
||||
final List<CollectionFilter> filters;
|
||||
final bool interactive;
|
||||
final FilterCallback? onTap, onRemove;
|
||||
|
||||
FilterBar({
|
||||
super.key,
|
||||
required Set<CollectionFilter> filters,
|
||||
this.interactive = true,
|
||||
this.onTap,
|
||||
this.onRemove,
|
||||
}) : filters = List<CollectionFilter>.from(filters)..sort();
|
||||
|
@ -111,6 +113,7 @@ class _FilterBarState extends State<FilterBar> {
|
|||
return _Chip(
|
||||
filter: filter,
|
||||
single: filters.length == 1,
|
||||
interactive: widget.interactive,
|
||||
onTap: onTap,
|
||||
onRemove: onRemove,
|
||||
);
|
||||
|
@ -119,12 +122,13 @@ class _FilterBarState extends State<FilterBar> {
|
|||
|
||||
class _Chip extends StatelessWidget {
|
||||
final CollectionFilter filter;
|
||||
final bool single;
|
||||
final bool single, interactive;
|
||||
final FilterCallback? onTap, onRemove;
|
||||
|
||||
const _Chip({
|
||||
required this.filter,
|
||||
required this.single,
|
||||
required this.interactive,
|
||||
required this.onTap,
|
||||
required this.onRemove,
|
||||
});
|
||||
|
@ -148,6 +152,7 @@ class _Chip extends StatelessWidget {
|
|||
heroType: HeroType.always,
|
||||
onTap: onTap,
|
||||
onRemove: onRemove,
|
||||
onLongPress: interactive ? AvesFilterChip.showDefaultLongPressMenu : null,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -50,7 +50,7 @@ class MosaicScaleOverlay extends StatelessWidget {
|
|||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
_buildBar(extentMax, colorScheme.onPrimary.withOpacity(.1)),
|
||||
_buildBar(extentMax, colorScheme.onBackground.withOpacity(.2)),
|
||||
_buildBar(scaledSize.width, colorScheme.primary),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -20,9 +20,6 @@ class AvesFab extends StatelessWidget {
|
|||
child: FloatingActionButton(
|
||||
tooltip: tooltip,
|
||||
onPressed: onPressed,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
),
|
||||
child: const Icon(AIcons.apply),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -22,7 +22,7 @@ class AvesOutlinedButton extends StatelessWidget {
|
|||
);
|
||||
}),
|
||||
foregroundColor: MaterialStateProperty.resolveWith<Color>((states) {
|
||||
return states.contains(MaterialState.disabled) ? theme.disabledColor : theme.colorScheme.onPrimary;
|
||||
return states.contains(MaterialState.disabled) ? theme.disabledColor : theme.colorScheme.onBackground;
|
||||
}),
|
||||
);
|
||||
return icon != null
|
||||
|
|
|
@ -61,7 +61,11 @@ class SettingsCollectionTile extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (filters.isNotEmpty) FilterBar(filters: filters),
|
||||
if (filters.isNotEmpty)
|
||||
FilterBar(
|
||||
filters: filters,
|
||||
interactive: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -275,7 +275,7 @@ class _QuickActionEditorBodyState<T extends Object> extends State<QuickActionEdi
|
|||
effect: WormEffect(
|
||||
dotWidth: 8,
|
||||
dotHeight: 8,
|
||||
dotColor: colorScheme.onPrimary.withOpacity(.3),
|
||||
dotColor: colorScheme.onBackground.withOpacity(.2),
|
||||
activeDotColor: colorScheme.primary,
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue