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