diff --git a/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart b/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart index 957d0b7..af0a488 100644 --- a/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart +++ b/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart @@ -28,7 +28,7 @@ class MeteringBottomControls extends StatelessWidget { Widget build(BuildContext context) { return BottomControlsBar( left: onSwitchEvSourceType != null - ? IconButton( + ? IconButton.filledTonal( onPressed: onSwitchEvSourceType, icon: Icon( UserPreferencesProvider.evSourceTypeOf(context) != EvSourceType.camera @@ -46,7 +46,7 @@ class MeteringBottomControls extends StatelessWidget { onPressed: onMeasure, child: ev != null ? _EvValueText(ev: ev!, ev100: ev100!) : null, ), - right: IconButton( + right: IconButton.filledTonal( onPressed: onSettings, icon: const Icon(Icons.settings), tooltip: S.of(context).tooltipOpenSettings, diff --git a/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart b/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart index dc958c3..a55532a 100644 --- a/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart +++ b/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart @@ -16,40 +16,27 @@ class BottomControlsBar extends StatelessWidget { @override Widget build(BuildContext context) { - final scheme = Theme.of(context).colorScheme; - return IconButtonTheme( - data: IconButtonThemeData( - style: ButtonStyle( - backgroundColor: MaterialStatePropertyAll(scheme.surface), - elevation: const MaterialStatePropertyAll(4), - iconColor: MaterialStatePropertyAll(scheme.onSurface), - shadowColor: const MaterialStatePropertyAll(Colors.transparent), - surfaceTintColor: MaterialStatePropertyAll(scheme.surfaceTint), - fixedSize: const MaterialStatePropertyAll(Size(Dimens.grid48, Dimens.grid48)), - ), + return ClipRRect( + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(Dimens.borderRadiusL), + topRight: Radius.circular(Dimens.borderRadiusL), ), - child: ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(Dimens.borderRadiusL), - topRight: Radius.circular(Dimens.borderRadiusL), - ), - child: ColoredBox( - color: Theme.of(context).colorScheme.surfaceElevated1, - child: SafeArea( - top: false, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: Dimens.paddingL), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - if (left != null) Expanded(child: Center(child: left)) else const Spacer(), - SizedBox.fromSize( - size: const Size.square(Dimens.grid72), - child: center, - ), - if (right != null) Expanded(child: Center(child: right)) else const Spacer(), - ], - ), + child: ColoredBox( + color: Theme.of(context).colorScheme.surfaceElevated1, + child: SafeArea( + top: false, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: Dimens.paddingL), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + if (left != null) Expanded(child: Center(child: left)) else const Spacer(), + SizedBox.fromSize( + size: const Size.square(Dimens.grid72), + child: center, + ), + if (right != null) Expanded(child: Center(child: right)) else const Spacer(), + ], ), ), ), diff --git a/lib/screens/timer/screen_timer.dart b/lib/screens/timer/screen_timer.dart index ab72679..ca42577 100644 --- a/lib/screens/timer/screen_timer.dart +++ b/lib/screens/timer/screen_timer.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/data/models/exposure_pair.dart'; +import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/res/dimens.dart'; import 'package:lightmeter/screens/shared/animated_circular_button/widget_button_circular_animated.dart'; import 'package:lightmeter/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart'; @@ -94,7 +95,7 @@ class TimerScreenState extends State with TickerProviderStateMixin ), const Spacer(), BottomControlsBar( - left: IconButton( + left: IconButton.filledTonal( onPressed: () { context.read().add(const ResetTimerEvent()); }, @@ -117,7 +118,11 @@ class TimerScreenState extends State with TickerProviderStateMixin ), ), ), - right: const CloseButton(), + right: IconButton.filledTonal( + onPressed: Navigator.of(context).pop, + icon: const Icon(Icons.close), + tooltip: S.of(context).tooltipClose, + ), ), ], ),