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) {
|
Widget build(BuildContext context) {
|
||||||
return BottomControlsBar(
|
return BottomControlsBar(
|
||||||
left: onSwitchEvSourceType != null
|
left: onSwitchEvSourceType != null
|
||||||
? IconButton(
|
? IconButton.filledTonal(
|
||||||
onPressed: onSwitchEvSourceType,
|
onPressed: onSwitchEvSourceType,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
UserPreferencesProvider.evSourceTypeOf(context) != EvSourceType.camera
|
UserPreferencesProvider.evSourceTypeOf(context) != EvSourceType.camera
|
||||||
|
@ -46,7 +46,7 @@ class MeteringBottomControls extends StatelessWidget {
|
||||||
onPressed: onMeasure,
|
onPressed: onMeasure,
|
||||||
child: ev != null ? _EvValueText(ev: ev!, ev100: ev100!) : null,
|
child: ev != null ? _EvValueText(ev: ev!, ev100: ev100!) : null,
|
||||||
),
|
),
|
||||||
right: IconButton(
|
right: IconButton.filledTonal(
|
||||||
onPressed: onSettings,
|
onPressed: onSettings,
|
||||||
icon: const Icon(Icons.settings),
|
icon: const Icon(Icons.settings),
|
||||||
tooltip: S.of(context).tooltipOpenSettings,
|
tooltip: S.of(context).tooltipOpenSettings,
|
||||||
|
|
|
@ -16,19 +16,7 @@ class BottomControlsBar extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final scheme = Theme.of(context).colorScheme;
|
return ClipRRect(
|
||||||
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(
|
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
topLeft: Radius.circular(Dimens.borderRadiusL),
|
topLeft: Radius.circular(Dimens.borderRadiusL),
|
||||||
topRight: 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/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/res/dimens.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/animated_circular_button/widget_button_circular_animated.dart';
|
||||||
import 'package:lightmeter/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.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(),
|
const Spacer(),
|
||||||
BottomControlsBar(
|
BottomControlsBar(
|
||||||
left: IconButton(
|
left: IconButton.filledTonal(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.read<TimerBloc>().add(const ResetTimerEvent());
|
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