mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +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",
|
"lightSensor": "Light sensor",
|
||||||
"meteringScreenLayout": "Metering screen layout",
|
"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.",
|
"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",
|
"meteringScreenFeatureExtremeExposurePairs": "Fastest & shortest exposure pairs",
|
||||||
"meteringScreenFeatureFilmPicker": "Film picker",
|
"meteringScreenFeatureFilmPicker": "Film picker",
|
||||||
"meteringScreenFeatureHistogram": "Histogram",
|
"meteringScreenFeatureHistogram": "Histogram",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"lightSensor": "Capteur de lumière",
|
"lightSensor": "Capteur de lumière",
|
||||||
"meteringScreenLayout": "Disposition de l'écran de mesure",
|
"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.",
|
"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",
|
"meteringScreenFeatureExtremeExposurePairs": "Paires d'exposition les plus rapides et les plus courtes",
|
||||||
"meteringScreenFeatureFilmPicker": "Sélecteur de film",
|
"meteringScreenFeatureFilmPicker": "Sélecteur de film",
|
||||||
"meteringScreenFeatureHistogram": "Histogramme",
|
"meteringScreenFeatureHistogram": "Histogramme",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"lightSensor": "Датчик освещённости",
|
"lightSensor": "Датчик освещённости",
|
||||||
"meteringScreenLayout": "Элементы главного экрана",
|
"meteringScreenLayout": "Элементы главного экрана",
|
||||||
"meteringScreenLayoutHint": "Здесь вы можете скрыть некоторые ненужные или неиспользуемые элементы с главного экрана.",
|
"meteringScreenLayoutHint": "Здесь вы можете скрыть некоторые ненужные или неиспользуемые элементы с главного экрана.",
|
||||||
|
"meteringScreenLayoutHintEquipmentProfiles": "Выбор профиля оборудования",
|
||||||
"meteringScreenFeatureExtremeExposurePairs": "Длинная и короткая выдержки",
|
"meteringScreenFeatureExtremeExposurePairs": "Длинная и короткая выдержки",
|
||||||
"meteringScreenFeatureFilmPicker": "Выбор пленки",
|
"meteringScreenFeatureFilmPicker": "Выбор пленки",
|
||||||
"meteringScreenFeatureHistogram": "Гистограмма",
|
"meteringScreenFeatureHistogram": "Гистограмма",
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
"lightSensor": "光传感器",
|
"lightSensor": "光传感器",
|
||||||
"meteringScreenLayout": "布局",
|
"meteringScreenLayout": "布局",
|
||||||
"meteringScreenLayoutHint": "隐藏不需要的元素,以免浪费曝光列表空间",
|
"meteringScreenLayoutHint": "隐藏不需要的元素,以免浪费曝光列表空间",
|
||||||
|
"meteringScreenLayoutHintEquipmentProfiles": "设备配置选择",
|
||||||
"meteringScreenFeatureExtremeExposurePairs": "最快 & 最慢曝光组合",
|
"meteringScreenFeatureExtremeExposurePairs": "最快 & 最慢曝光组合",
|
||||||
"meteringScreenFeatureFilmPicker": "胶片选择",
|
"meteringScreenFeatureFilmPicker": "胶片选择",
|
||||||
"meteringScreenFeatureHistogram": "直方图",
|
"meteringScreenFeatureHistogram": "直方图",
|
||||||
|
|
|
@ -84,15 +84,7 @@ class _InheritedListeners extends StatelessWidget {
|
||||||
context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: MeteringScreenLayoutFeatureListener(
|
child: child,
|
||||||
feature: MeteringScreenLayoutFeature.equipmentProfiles,
|
|
||||||
onDidChangeDependencies: (value) {
|
|
||||||
if (!value) {
|
|
||||||
EquipmentProfileProvider.of(context).setProfile(EquipmentProfiles.of(context).first);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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/generated/l10n.dart';
|
||||||
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||||
|
|
||||||
class MeteringScreenLayoutFeaturesDialog extends StatefulWidget {
|
class MeteringScreenLayoutFeaturesDialog extends StatefulWidget {
|
||||||
const MeteringScreenLayoutFeaturesDialog({super.key});
|
const MeteringScreenLayoutFeaturesDialog({super.key});
|
||||||
|
@ -25,18 +26,23 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
child: ListView(
|
child: Column(
|
||||||
shrinkWrap: true,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingL),
|
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingL),
|
||||||
child: Text(S.of(context).meteringScreenLayoutHint),
|
child: Text(S.of(context).meteringScreenLayoutHint),
|
||||||
),
|
),
|
||||||
const SizedBox(height: Dimens.grid16),
|
const SizedBox(height: Dimens.grid16),
|
||||||
_featureListTile(MeteringScreenLayoutFeature.equipmentProfiles),
|
ListView(
|
||||||
_featureListTile(MeteringScreenLayoutFeature.extremeExposurePairs),
|
shrinkWrap: true,
|
||||||
_featureListTile(MeteringScreenLayoutFeature.filmPicker),
|
children: [
|
||||||
_featureListTile(MeteringScreenLayoutFeature.histogram),
|
_featureListTile(MeteringScreenLayoutFeature.equipmentProfiles),
|
||||||
|
_featureListTile(MeteringScreenLayoutFeature.extremeExposurePairs),
|
||||||
|
_featureListTile(MeteringScreenLayoutFeature.filmPicker),
|
||||||
|
_featureListTile(MeteringScreenLayoutFeature.histogram),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -48,6 +54,9 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (!_features[MeteringScreenLayoutFeature.equipmentProfiles]!) {
|
||||||
|
EquipmentProfileProvider.of(context).setProfile(EquipmentProfiles.of(context).first);
|
||||||
|
}
|
||||||
UserPreferencesProvider.of(context).setMeteringScreenLayout(_features);
|
UserPreferencesProvider.of(context).setMeteringScreenLayout(_features);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
@ -73,7 +82,7 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
|
||||||
String _toStringLocalized(BuildContext context, MeteringScreenLayoutFeature feature) {
|
String _toStringLocalized(BuildContext context, MeteringScreenLayoutFeature feature) {
|
||||||
switch (feature) {
|
switch (feature) {
|
||||||
case MeteringScreenLayoutFeature.equipmentProfiles:
|
case MeteringScreenLayoutFeature.equipmentProfiles:
|
||||||
return S.of(context).equipmentProfiles;
|
return S.of(context).meteringScreenLayoutHintEquipmentProfiles;
|
||||||
case MeteringScreenLayoutFeature.extremeExposurePairs:
|
case MeteringScreenLayoutFeature.extremeExposurePairs:
|
||||||
return S.of(context).meteringScreenFeatureExtremeExposurePairs;
|
return S.of(context).meteringScreenFeatureExtremeExposurePairs;
|
||||||
case MeteringScreenLayoutFeature.filmPicker:
|
case MeteringScreenLayoutFeature.filmPicker:
|
||||||
|
|
Loading…
Reference in a new issue