allow to hide pinhole shutter speed

This commit is contained in:
Vadim 2025-09-08 17:09:26 +02:00
parent c40354c62b
commit 56ab8aa85a
3 changed files with 32 additions and 29 deletions

View file

@ -126,11 +126,13 @@ class CameraContainer extends StatelessWidget {
enabledFeaturesHeight += Dimens.readingContainerSingleValueHeight; enabledFeaturesHeight += Dimens.readingContainerSingleValueHeight;
enabledFeaturesHeight += Dimens.paddingS; enabledFeaturesHeight += Dimens.paddingS;
} }
if (EquipmentProfiles.selectedOf(context) is PinholeEquipmentProfile) { if (context.meteringFeature(MeteringScreenLayoutFeature.extremeExposurePairs)) {
enabledFeaturesHeight += Dimens.readingContainerSingleValueHeight; if (EquipmentProfiles.selectedOf(context) is PinholeEquipmentProfile) {
enabledFeaturesHeight += Dimens.paddingS; enabledFeaturesHeight += Dimens.readingContainerSingleValueHeight;
} else if (context.meteringFeature(MeteringScreenLayoutFeature.extremeExposurePairs)) { } else {
enabledFeaturesHeight += Dimens.readingContainerDoubleValueHeight; enabledFeaturesHeight += Dimens.readingContainerDoubleValueHeight;
}
enabledFeaturesHeight += Dimens.paddingS; enabledFeaturesHeight += Dimens.paddingS;
} }

View file

@ -65,26 +65,27 @@ class ExposurePairsList extends StatelessWidget {
], ],
), ),
), ),
Positioned( if (exposurePairs.length > 1)
top: 0, Positioned(
bottom: 0, top: 0,
child: LayoutBuilder( bottom: 0,
builder: (context, constraints) => Align( child: LayoutBuilder(
alignment: index == 0 builder: (context, constraints) => Align(
? Alignment.bottomCenter alignment: index == 0
: (index == exposurePairs.length - 1 ? Alignment.topCenter : Alignment.center), ? Alignment.bottomCenter
child: SizedBox( : (index == exposurePairs.length - 1 ? Alignment.topCenter : Alignment.center),
height: index == 0 || index == exposurePairs.length - 1 child: SizedBox(
? constraints.maxHeight / 2 height: index == 0 || index == exposurePairs.length - 1
: constraints.maxHeight, ? constraints.maxHeight / 2
child: ColoredBox( : constraints.maxHeight,
color: Theme.of(context).colorScheme.onSurface, child: ColoredBox(
child: const SizedBox(width: 1), color: Theme.of(context).colorScheme.onSurface,
child: const SizedBox(width: 1),
),
), ),
), ),
), ),
), ),
),
], ],
); );
}, },

View file

@ -46,14 +46,14 @@ class ReadingsContainer extends StatelessWidget {
const EquipmentProfilePicker(), const EquipmentProfilePicker(),
const _InnerPadding(), const _InnerPadding(),
], ],
if (EquipmentProfiles.selectedOf(context) is PinholeEquipmentProfile) ...[ if (context.meteringFeature(MeteringScreenLayoutFeature.extremeExposurePairs)) ...[
ShutterSpeedContainer(shutterSpeedValue: fastest?.shutterSpeed), if (EquipmentProfiles.selectedOf(context) is PinholeEquipmentProfile)
const _InnerPadding(), ShutterSpeedContainer(shutterSpeedValue: fastest?.shutterSpeed)
] else if (context.meteringFeature(MeteringScreenLayoutFeature.extremeExposurePairs)) ...[ else
ExtremeExposurePairsContainer( ExtremeExposurePairsContainer(
fastest: fastest, fastest: fastest,
slowest: slowest, slowest: slowest,
), ),
const _InnerPadding(), const _InnerPadding(),
], ],
if (context.meteringFeature(MeteringScreenLayoutFeature.filmPicker)) ...[ if (context.meteringFeature(MeteringScreenLayoutFeature.filmPicker)) ...[