mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 15:00:40 +00:00
Equipment profiles issues (#115)
* update equipment profile from dialog * updated `MeteringScreenLayoutFeaturesDialog` translations
This commit is contained in:
parent
4201d36abb
commit
cf4373d854
6 changed files with 21 additions and 16 deletions
|
@ -36,6 +36,7 @@
|
|||
"lightSensor": "Light sensor",
|
||||
"meteringScreenLayout": "Metering screen layout",
|
||||
"meteringScreenLayoutHint": "Hide elements on the metering screen that you don't need so that they don't waste exposure pairs list space.",
|
||||
"meteringScreenLayoutHintEquipmentProfiles": "Equipment profile picker",
|
||||
"meteringScreenFeatureExtremeExposurePairs": "Fastest & shortest exposure pairs",
|
||||
"meteringScreenFeatureFilmPicker": "Film picker",
|
||||
"meteringScreenFeatureHistogram": "Histogram",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
"lightSensor": "Capteur de lumière",
|
||||
"meteringScreenLayout": "Disposition de l'écran de mesure",
|
||||
"meteringScreenLayoutHint": "Masquer les éléments sur l'écran de mesure dont vous n'avez pas besoin pour qu'ils ne gaspillent pas de l'espace dans les paires d'exposition.",
|
||||
"meteringScreenLayoutHintEquipmentProfiles": "Sélecteur de profil de l'équipement",
|
||||
"meteringScreenFeatureExtremeExposurePairs": "Paires d'exposition les plus rapides et les plus courtes",
|
||||
"meteringScreenFeatureFilmPicker": "Sélecteur de film",
|
||||
"meteringScreenFeatureHistogram": "Histogramme",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
"lightSensor": "Датчик освещённости",
|
||||
"meteringScreenLayout": "Элементы главного экрана",
|
||||
"meteringScreenLayoutHint": "Здесь вы можете скрыть некоторые ненужные или неиспользуемые элементы с главного экрана.",
|
||||
"meteringScreenLayoutHintEquipmentProfiles": "Выбор профиля оборудования",
|
||||
"meteringScreenFeatureExtremeExposurePairs": "Длинная и короткая выдержки",
|
||||
"meteringScreenFeatureFilmPicker": "Выбор пленки",
|
||||
"meteringScreenFeatureHistogram": "Гистограмма",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
"lightSensor": "光传感器",
|
||||
"meteringScreenLayout": "布局",
|
||||
"meteringScreenLayoutHint": "隐藏不需要的元素,以免浪费曝光列表空间",
|
||||
"meteringScreenLayoutHintEquipmentProfiles": "设备配置选择",
|
||||
"meteringScreenFeatureExtremeExposurePairs": "最快 & 最慢曝光组合",
|
||||
"meteringScreenFeatureFilmPicker": "胶片选择",
|
||||
"meteringScreenFeatureHistogram": "直方图",
|
||||
|
|
|
@ -84,15 +84,7 @@ class _InheritedListeners extends StatelessWidget {
|
|||
context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
||||
}
|
||||
},
|
||||
child: MeteringScreenLayoutFeatureListener(
|
||||
feature: MeteringScreenLayoutFeature.equipmentProfiles,
|
||||
onDidChangeDependencies: (value) {
|
||||
if (!value) {
|
||||
EquipmentProfileProvider.of(context).setProfile(EquipmentProfiles.of(context).first);
|
||||
}
|
||||
},
|
||||
child: child,
|
||||
),
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:lightmeter/data/models/metering_screen_layout_config.dart';
|
|||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||
|
||||
class MeteringScreenLayoutFeaturesDialog extends StatefulWidget {
|
||||
const MeteringScreenLayoutFeaturesDialog({super.key});
|
||||
|
@ -25,18 +26,23 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
|||
contentPadding: EdgeInsets.zero,
|
||||
content: SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingL),
|
||||
child: Text(S.of(context).meteringScreenLayoutHint),
|
||||
),
|
||||
const SizedBox(height: Dimens.grid16),
|
||||
_featureListTile(MeteringScreenLayoutFeature.equipmentProfiles),
|
||||
_featureListTile(MeteringScreenLayoutFeature.extremeExposurePairs),
|
||||
_featureListTile(MeteringScreenLayoutFeature.filmPicker),
|
||||
_featureListTile(MeteringScreenLayoutFeature.histogram),
|
||||
ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
_featureListTile(MeteringScreenLayoutFeature.equipmentProfiles),
|
||||
_featureListTile(MeteringScreenLayoutFeature.extremeExposurePairs),
|
||||
_featureListTile(MeteringScreenLayoutFeature.filmPicker),
|
||||
_featureListTile(MeteringScreenLayoutFeature.histogram),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -48,6 +54,9 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
|||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
if (!_features[MeteringScreenLayoutFeature.equipmentProfiles]!) {
|
||||
EquipmentProfileProvider.of(context).setProfile(EquipmentProfiles.of(context).first);
|
||||
}
|
||||
UserPreferencesProvider.of(context).setMeteringScreenLayout(_features);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
@ -73,7 +82,7 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
|||
String _toStringLocalized(BuildContext context, MeteringScreenLayoutFeature feature) {
|
||||
switch (feature) {
|
||||
case MeteringScreenLayoutFeature.equipmentProfiles:
|
||||
return S.of(context).equipmentProfiles;
|
||||
return S.of(context).meteringScreenLayoutHintEquipmentProfiles;
|
||||
case MeteringScreenLayoutFeature.extremeExposurePairs:
|
||||
return S.of(context).meteringScreenFeatureExtremeExposurePairs;
|
||||
case MeteringScreenLayoutFeature.filmPicker:
|
||||
|
|
Loading…
Reference in a new issue