mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 15:00:40 +00:00
added manual shutter speed to equipment profiles
This commit is contained in:
parent
e1f1fd855a
commit
c7af27e7cf
7 changed files with 35 additions and 7 deletions
|
@ -58,6 +58,8 @@
|
|||
"ndFiltersFilterDescription": "Select the ND filters to display. These may be your most commonly used ND filters or the ones that fit your lens.",
|
||||
"shutterSpeedValues": "Shutter speed values",
|
||||
"shutterSpeedValuesFilterDescription": "Select the range of shutter speed values to display. This is usually determined by the camera body you are using.",
|
||||
"shutterSpeedManualShort": "B",
|
||||
"shutterSpeedManual": "Manual",
|
||||
"isoValues": "ISO values",
|
||||
"isoValuesFilterDescription": "Select the ISO values to display. These may be your most commonly used values or those supported by your camera.",
|
||||
"lensZoom": "Lens zoom",
|
||||
|
@ -116,4 +118,4 @@
|
|||
"tooltipUseLightSensor": "Use lightsensor",
|
||||
"tooltipUseCamera": "Use camera",
|
||||
"tooltipOpenSettings": "Open settings"
|
||||
}
|
||||
}
|
|
@ -58,6 +58,8 @@
|
|||
"ndFiltersFilterDescription": "Sélectionnez les filtres ND à afficher. Ce sont peut-être vos filtres ND les plus couramment utilisés ou ceux qui correspondent à votre lentille.",
|
||||
"shutterSpeedValues": "Valeurs de la vitesse d'obturation",
|
||||
"shutterSpeedValuesFilterDescription": "Sélectionnez la plage de valeurs de vitesse d'obturation à afficher. Cela est généralement déterminé par le corps de l'appareil que vous utilisez.",
|
||||
"shutterSpeedManualShort": "B",
|
||||
"shutterSpeedManual": "Manuelle",
|
||||
"isoValues": "Valeurs ISO",
|
||||
"isoValuesFilterDescription": "Sélectionnez les valeurs ISO à afficher. Ce sont peut-être vos valeurs les plus couramment utilisées ou celles prises en charge par votre caméra.",
|
||||
"lensZoom": "Zoom sur l'objectif",
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
"ndFiltersFilterDescription": "Выберите ND фильтры для отображения. Это могут быть наиболее часто используемые ND фильтры или фильтры, подходящие под ваш объектив.",
|
||||
"shutterSpeedValues": "Значения выдержки",
|
||||
"shutterSpeedValuesFilterDescription": "Выберите диапазон значений выдержки. Обычно ограничивается возможностями вашей камеры.",
|
||||
"shutterSpeedManualShort": "B",
|
||||
"shutterSpeedManual": "Ручная",
|
||||
"isoValues": "Значения ISO",
|
||||
"isoValuesFilterDescription": "Выберите значения ISO для отображения. Это может быть наиболее часто используемые значения или значения, поддерживаемые вашей камерой.",
|
||||
"lensZoom": "Зум объектива",
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
"ndFiltersFilterDescription": "选择要显示的 ND 滤镜系数。可能是您最常用的 ND 滤镜,也可能是适合您镜头的减光镜。",
|
||||
"shutterSpeedValues": "快门速度",
|
||||
"shutterSpeedValuesFilterDescription": "选择要显示的快门速度范围。这通常由您使用的相机机身决定。",
|
||||
"shutterSpeedManualShort": "B",
|
||||
"shutterSpeedManual": "手册",
|
||||
"isoValues": "ISO",
|
||||
"isoValuesFilterDescription": "选择要显示的 ISO 。这些可能是您常用的ISO值,也可以是相机支持的ISO范围。",
|
||||
"lensZoom": "镜头变焦",
|
||||
|
|
|
@ -8,6 +8,8 @@ class RangePickerListTile<T extends PhotographyValue> extends StatelessWidget {
|
|||
final String description;
|
||||
final List<T> selectedValues;
|
||||
final List<T> values;
|
||||
final String Function(BuildContext context, T value)? trailingAdapter;
|
||||
final String Function(BuildContext context, T value)? dialogValueAdapter;
|
||||
final ValueChanged<List<T>> onChanged;
|
||||
|
||||
const RangePickerListTile({
|
||||
|
@ -16,6 +18,8 @@ class RangePickerListTile<T extends PhotographyValue> extends StatelessWidget {
|
|||
required this.description,
|
||||
required this.selectedValues,
|
||||
required this.values,
|
||||
this.trailingAdapter,
|
||||
this.dialogValueAdapter,
|
||||
required this.onChanged,
|
||||
super.key,
|
||||
});
|
||||
|
@ -25,7 +29,7 @@ class RangePickerListTile<T extends PhotographyValue> extends StatelessWidget {
|
|||
return ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(title),
|
||||
trailing: Text("${selectedValues.first} - ${selectedValues.last}"),
|
||||
trailing: Text(_trailing(context)),
|
||||
onTap: () {
|
||||
showDialog<List<T>>(
|
||||
context: context,
|
||||
|
@ -35,7 +39,7 @@ class RangePickerListTile<T extends PhotographyValue> extends StatelessWidget {
|
|||
description: description,
|
||||
values: values,
|
||||
selectedValues: selectedValues,
|
||||
titleAdapter: (_, value) => value.toString(),
|
||||
valueAdapter: (context, value) => dialogValueAdapter?.call(context, value) ?? value.toString(),
|
||||
),
|
||||
).then((values) {
|
||||
if (values != null) {
|
||||
|
@ -45,4 +49,16 @@ class RangePickerListTile<T extends PhotographyValue> extends StatelessWidget {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
String _trailing(BuildContext context) {
|
||||
final buffer = StringBuffer();
|
||||
buffer.write(trailingAdapter?.call(context, selectedValues.first) ?? selectedValues.first);
|
||||
if (selectedValues.first != selectedValues.last) {
|
||||
buffer.writeAll([
|
||||
' - ',
|
||||
trailingAdapter?.call(context, selectedValues.last) ?? selectedValues.last,
|
||||
]);
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,6 +269,10 @@ class _AnimatedEquipmentListTiles extends AnimatedWidget {
|
|||
values: ShutterSpeedValue.values,
|
||||
selectedValues: equipmentData.shutterSpeedValues,
|
||||
onChanged: onShutterSpeedValuesSelected,
|
||||
trailingAdapter: (context, value) =>
|
||||
value.value == 1 ? S.of(context).shutterSpeedManualShort : value.toString(),
|
||||
dialogValueAdapter: (context, value) =>
|
||||
value.value == 1 ? S.of(context).shutterSpeedManual : value.toString(),
|
||||
),
|
||||
SliderPickerListTile(
|
||||
icon: Icons.zoom_in,
|
||||
|
|
|
@ -9,7 +9,7 @@ class DialogRangePicker<T extends PhotographyValue> extends StatefulWidget {
|
|||
final String description;
|
||||
final List<T> values;
|
||||
final List<T> selectedValues;
|
||||
final String Function(BuildContext context, T value) titleAdapter;
|
||||
final String Function(BuildContext context, T value) valueAdapter;
|
||||
|
||||
const DialogRangePicker({
|
||||
required this.icon,
|
||||
|
@ -17,7 +17,7 @@ class DialogRangePicker<T extends PhotographyValue> extends StatefulWidget {
|
|||
required this.description,
|
||||
required this.values,
|
||||
required this.selectedValues,
|
||||
required this.titleAdapter,
|
||||
required this.valueAdapter,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
@ -52,8 +52,8 @@ class _DialogRangePickerState<T extends PhotographyValue> extends State<DialogRa
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(widget.values[_start].toString()),
|
||||
Text(widget.values[_end].toString()),
|
||||
Text(widget.valueAdapter(context, widget.values[_start])),
|
||||
Text(widget.valueAdapter(context, widget.values[_end])),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue