#74 viewer: option to show/hide overlay on opening
This commit is contained in:
parent
b605cb62c7
commit
33143bea83
6 changed files with 22 additions and 3 deletions
|
@ -688,8 +688,8 @@
|
||||||
|
|
||||||
"settingsSectionViewer": "Viewer",
|
"settingsSectionViewer": "Viewer",
|
||||||
"@settingsSectionViewer": {},
|
"@settingsSectionViewer": {},
|
||||||
"settingsImageBackground": "Image background",
|
"settingsViewerShowOverlayOnOpening": "Show overlay on opening",
|
||||||
"@settingsImageBackground": {},
|
"@settingsViewerShowOverlayOnOpening": {},
|
||||||
"settingsViewerShowMinimap": "Show minimap",
|
"settingsViewerShowMinimap": "Show minimap",
|
||||||
"@settingsViewerShowMinimap": {},
|
"@settingsViewerShowMinimap": {},
|
||||||
"settingsViewerShowInformation": "Show information",
|
"settingsViewerShowInformation": "Show information",
|
||||||
|
@ -702,6 +702,8 @@
|
||||||
"@settingsViewerEnableOverlayBlurEffect": {},
|
"@settingsViewerEnableOverlayBlurEffect": {},
|
||||||
"settingsViewerUseCutout": "Use cutout area",
|
"settingsViewerUseCutout": "Use cutout area",
|
||||||
"@settingsViewerUseCutout": {},
|
"@settingsViewerUseCutout": {},
|
||||||
|
"settingsImageBackground": "Image background",
|
||||||
|
"@settingsImageBackground": {},
|
||||||
|
|
||||||
"settingsViewerQuickActionsTile": "Quick actions",
|
"settingsViewerQuickActionsTile": "Quick actions",
|
||||||
"@settingsViewerQuickActionsTile": {},
|
"@settingsViewerQuickActionsTile": {},
|
||||||
|
|
|
@ -330,13 +330,14 @@
|
||||||
"settingsCollectionSelectionQuickActionEditorBanner": "버튼을 길게 누른 후 이동하여 항목 선택할 때 표시될 버튼을 선택하세요.",
|
"settingsCollectionSelectionQuickActionEditorBanner": "버튼을 길게 누른 후 이동하여 항목 선택할 때 표시될 버튼을 선택하세요.",
|
||||||
|
|
||||||
"settingsSectionViewer": "뷰어",
|
"settingsSectionViewer": "뷰어",
|
||||||
"settingsImageBackground": "사진 배경",
|
"settingsViewerShowOverlayOnOpening": "열릴 때 오버레이 표시",
|
||||||
"settingsViewerShowMinimap": "미니맵 표시",
|
"settingsViewerShowMinimap": "미니맵 표시",
|
||||||
"settingsViewerShowInformation": "상세 정보 표시",
|
"settingsViewerShowInformation": "상세 정보 표시",
|
||||||
"settingsViewerShowInformationSubtitle": "제목, 날짜, 장소 등 표시",
|
"settingsViewerShowInformationSubtitle": "제목, 날짜, 장소 등 표시",
|
||||||
"settingsViewerShowShootingDetails": "촬영 정보 표시",
|
"settingsViewerShowShootingDetails": "촬영 정보 표시",
|
||||||
"settingsViewerEnableOverlayBlurEffect": "오버레이 흐림 효과",
|
"settingsViewerEnableOverlayBlurEffect": "오버레이 흐림 효과",
|
||||||
"settingsViewerUseCutout": "컷아웃 영역 사용",
|
"settingsViewerUseCutout": "컷아웃 영역 사용",
|
||||||
|
"settingsImageBackground": "사진 배경",
|
||||||
|
|
||||||
"settingsViewerQuickActionsTile": "빠른 작업",
|
"settingsViewerQuickActionsTile": "빠른 작업",
|
||||||
"settingsViewerQuickActionEditorTitle": "빠른 작업",
|
"settingsViewerQuickActionEditorTitle": "빠른 작업",
|
||||||
|
|
|
@ -54,6 +54,7 @@ class SettingsDefaults {
|
||||||
EntryAction.share,
|
EntryAction.share,
|
||||||
EntryAction.rotateScreen,
|
EntryAction.rotateScreen,
|
||||||
];
|
];
|
||||||
|
static const showOverlayOnOpening = true;
|
||||||
static const showOverlayMinimap = false;
|
static const showOverlayMinimap = false;
|
||||||
static const showOverlayInfo = true;
|
static const showOverlayInfo = true;
|
||||||
static const showOverlayShootingDetails = false;
|
static const showOverlayShootingDetails = false;
|
||||||
|
|
|
@ -73,6 +73,7 @@ class Settings extends ChangeNotifier {
|
||||||
|
|
||||||
// viewer
|
// viewer
|
||||||
static const viewerQuickActionsKey = 'viewer_quick_actions';
|
static const viewerQuickActionsKey = 'viewer_quick_actions';
|
||||||
|
static const showOverlayOnOpeningKey = 'show_overlay_on_opening';
|
||||||
static const showOverlayMinimapKey = 'show_overlay_minimap';
|
static const showOverlayMinimapKey = 'show_overlay_minimap';
|
||||||
static const showOverlayInfoKey = 'show_overlay_info';
|
static const showOverlayInfoKey = 'show_overlay_info';
|
||||||
static const showOverlayShootingDetailsKey = 'show_overlay_shooting_details';
|
static const showOverlayShootingDetailsKey = 'show_overlay_shooting_details';
|
||||||
|
@ -296,6 +297,10 @@ class Settings extends ChangeNotifier {
|
||||||
|
|
||||||
set viewerQuickActions(List<EntryAction> newValue) => setAndNotify(viewerQuickActionsKey, newValue.map((v) => v.toString()).toList());
|
set viewerQuickActions(List<EntryAction> newValue) => setAndNotify(viewerQuickActionsKey, newValue.map((v) => v.toString()).toList());
|
||||||
|
|
||||||
|
bool get showOverlayOnOpening => getBoolOrDefault(showOverlayOnOpeningKey, SettingsDefaults.showOverlayOnOpening);
|
||||||
|
|
||||||
|
set showOverlayOnOpening(bool newValue) => setAndNotify(showOverlayOnOpeningKey, newValue);
|
||||||
|
|
||||||
bool get showOverlayMinimap => getBoolOrDefault(showOverlayMinimapKey, SettingsDefaults.showOverlayMinimap);
|
bool get showOverlayMinimap => getBoolOrDefault(showOverlayMinimapKey, SettingsDefaults.showOverlayMinimap);
|
||||||
|
|
||||||
set showOverlayMinimap(bool newValue) => setAndNotify(showOverlayMinimapKey, newValue);
|
set showOverlayMinimap(bool newValue) => setAndNotify(showOverlayMinimapKey, newValue);
|
||||||
|
@ -540,6 +545,7 @@ class Settings extends ChangeNotifier {
|
||||||
case showThumbnailMotionPhotoKey:
|
case showThumbnailMotionPhotoKey:
|
||||||
case showThumbnailRawKey:
|
case showThumbnailRawKey:
|
||||||
case showThumbnailVideoDurationKey:
|
case showThumbnailVideoDurationKey:
|
||||||
|
case showOverlayOnOpeningKey:
|
||||||
case showOverlayMinimapKey:
|
case showOverlayMinimapKey:
|
||||||
case showOverlayInfoKey:
|
case showOverlayInfoKey:
|
||||||
case showOverlayShootingDetailsKey:
|
case showOverlayShootingDetailsKey:
|
||||||
|
|
|
@ -32,6 +32,14 @@ class ViewerSection extends StatelessWidget {
|
||||||
showHighlight: false,
|
showHighlight: false,
|
||||||
children: [
|
children: [
|
||||||
const ViewerActionsTile(),
|
const ViewerActionsTile(),
|
||||||
|
Selector<Settings, bool>(
|
||||||
|
selector: (context, s) => s.showOverlayOnOpening,
|
||||||
|
builder: (context, current, child) => SwitchListTile(
|
||||||
|
value: current,
|
||||||
|
onChanged: (v) => settings.showOverlayOnOpening = v,
|
||||||
|
title: Text(context.l10n.settingsViewerShowOverlayOnOpening),
|
||||||
|
),
|
||||||
|
),
|
||||||
Selector<Settings, bool>(
|
Selector<Settings, bool>(
|
||||||
selector: (context, s) => s.showOverlayMinimap,
|
selector: (context, s) => s.showOverlayMinimap,
|
||||||
builder: (context, current, child) => SwitchListTile(
|
builder: (context, current, child) => SwitchListTile(
|
||||||
|
|
|
@ -118,6 +118,7 @@ class _EntryViewerStackState extends State<EntryViewerStack> with FeedbackMixin,
|
||||||
parent: _overlayAnimationController,
|
parent: _overlayAnimationController,
|
||||||
curve: Curves.easeOutQuad,
|
curve: Curves.easeOutQuad,
|
||||||
));
|
));
|
||||||
|
_overlayVisible.value = settings.showOverlayOnOpening;
|
||||||
_overlayVisible.addListener(_onOverlayVisibleChange);
|
_overlayVisible.addListener(_onOverlayVisibleChange);
|
||||||
_videoActionDelegate = VideoActionDelegate(
|
_videoActionDelegate = VideoActionDelegate(
|
||||||
collection: collection,
|
collection: collection,
|
||||||
|
|
Loading…
Reference in a new issue