mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
use filled tonal icon buttons
This commit is contained in:
parent
4a27c27270
commit
5e764d3876
3 changed files with 29 additions and 37 deletions
|
@ -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,
|
||||
|
|
|
@ -16,19 +16,7 @@ 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)),
|
||||
),
|
||||
),
|
||||
child: ClipRRect(
|
||||
return ClipRRect(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(Dimens.borderRadiusL),
|
||||
topRight: Radius.circular(Dimens.borderRadiusL),
|
||||
|
@ -53,7 +41,6 @@ class BottomControlsBar extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<TimerScreen> with TickerProviderStateMixin
|
|||
),
|
||||
const Spacer(),
|
||||
BottomControlsBar(
|
||||
left: IconButton(
|
||||
left: IconButton.filledTonal(
|
||||
onPressed: () {
|
||||
context.read<TimerBloc>().add(const ResetTimerEvent());
|
||||
},
|
||||
|
@ -117,7 +118,11 @@ class TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
|||
),
|
||||
),
|
||||
),
|
||||
right: const CloseButton(),
|
||||
right: IconButton.filledTonal(
|
||||
onPressed: Navigator.of(context).pop,
|
||||
icon: const Icon(Icons.close),
|
||||
tooltip: S.of(context).tooltipClose,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue