added border radius to overlays

This commit is contained in:
Vadim 2022-10-29 14:06:39 +03:00
parent 3c1f803e25
commit 2300c828b1
2 changed files with 105 additions and 93 deletions

View file

@ -18,27 +18,33 @@ class MeteringBottomControls extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ColoredBox( return ClipRRect(
color: Theme.of(context).colorScheme.surface, borderRadius: const BorderRadius.only(
child: SafeArea( topLeft: Radius.circular(Dimens.borderRadiusL),
top: false, topRight: Radius.circular(Dimens.borderRadiusL),
child: Padding( ),
padding: const EdgeInsets.all(Dimens.paddingM), child: ColoredBox(
child: Row( color: Theme.of(context).colorScheme.surface,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, child: SafeArea(
children: [ top: false,
MeteringBottomControlsSideButton( child: Padding(
onPressed: onSourceChanged, padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM),
icon: Icons.flip_camera_android, child: Row(
), mainAxisAlignment: MainAxisAlignment.spaceEvenly,
MeteringMeasureButton( children: [
onTap: onMeasure, MeteringBottomControlsSideButton(
), onPressed: onSourceChanged,
MeteringBottomControlsSideButton( icon: Icons.flip_camera_android,
onPressed: onSettings, ),
icon: Icons.settings, MeteringMeasureButton(
), onTap: onMeasure,
], ),
MeteringBottomControlsSideButton(
onPressed: onSettings,
icon: Icons.settings,
),
],
),
), ),
), ),
), ),

View file

@ -22,85 +22,91 @@ class MeteringTopBar extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final columnWidth = final columnWidth =
(MediaQuery.of(context).size.width - Dimens.paddingM * 2 - Dimens.grid16 * (_columnsCount - 1)) / 3; (MediaQuery.of(context).size.width - Dimens.paddingM * 2 - Dimens.grid16 * (_columnsCount - 1)) / 3;
return ColoredBox( return ClipRRect(
color: Theme.of(context).colorScheme.surface, borderRadius: const BorderRadius.only(
child: Padding( bottomLeft: Radius.circular(Dimens.borderRadiusL),
padding: const EdgeInsets.all(Dimens.paddingM), bottomRight: Radius.circular(Dimens.borderRadiusL),
child: SafeArea( ),
bottom: false, child: ColoredBox(
child: Row( color: Theme.of(context).colorScheme.surface,
mainAxisSize: MainAxisSize.min, child: Padding(
children: [ padding: const EdgeInsets.all(Dimens.paddingM),
Expanded( child: SafeArea(
child: Column( bottom: false,
crossAxisAlignment: CrossAxisAlignment.stretch, child: Row(
children: [ mainAxisSize: MainAxisSize.min,
SizedBox( children: [
height: columnWidth / 3 * 4, Expanded(
child: ReadingContainer( child: Column(
values: const [ crossAxisAlignment: CrossAxisAlignment.stretch,
ReadingValue( children: [
label: 'Fastest', SizedBox(
value: 'f/5.6 - 1/2000', height: columnWidth / 3 * 4,
child: ReadingContainer(
values: const [
ReadingValue(
label: 'Fastest',
value: 'f/5.6 - 1/2000',
),
ReadingValue(
label: 'Slowest',
value: 'f/45 - 1/30',
),
],
),
),
const _InnerPadding(),
Row(
children: [
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'EV',
value: ev.toString(),
),
),
), ),
ReadingValue( const _InnerPadding(),
label: 'Slowest', SizedBox(
value: 'f/45 - 1/30', width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'ISO',
value: iso.toString(),
),
),
), ),
], ],
), )
), ],
const _InnerPadding(), ),
Row(
children: [
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'EV',
value: ev.toString(),
),
),
),
const _InnerPadding(),
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'ISO',
value: iso.toString(),
),
),
),
],
)
],
), ),
), const _InnerPadding(),
const _InnerPadding(), SizedBox(
SizedBox( width: columnWidth,
width: columnWidth, child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.stretch,
crossAxisAlignment: CrossAxisAlignment.stretch, children: [
children: [ ClipRRect(
ClipRRect( borderRadius: BorderRadius.circular(Dimens.borderRadiusM),
borderRadius: BorderRadius.circular(Dimens.borderRadiusM), child: const AspectRatio(
child: const AspectRatio( aspectRatio: 3 / 4,
aspectRatio: 3 / 4, child: ColoredBox(color: Colors.black),
child: ColoredBox(color: Colors.black), ),
), ),
), const _InnerPadding(),
const _InnerPadding(), ReadingContainer.singleValue(
ReadingContainer.singleValue( value: ReadingValue(
value: ReadingValue( label: 'ND',
label: 'ND', value: nd.toString(),
value: nd.toString(), ),
), ),
), ],
], ),
), ),
), ],
], ),
), ),
), ),
), ),