Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Change lock screen background asset

ashilknc71850be07d8
diff --git a/mobile/assets/2.0x/lock_screen_background.png b/mobile/assets/2.0x/lock_screen_background.png
new file mode 100644
index 0000000000..a2bcb30856
Binary files /dev/null and b/mobile/assets/2.0x/lock_screen_background.png differ
diff --git a/mobile/assets/3.0x/lock_screen_background.png b/mobile/assets/3.0x/lock_screen_background.png
new file mode 100644
index 0000000000..72ad6b2639
Binary files /dev/null and b/mobile/assets/3.0x/lock_screen_background.png differ
diff --git a/mobile/assets/loading_photos_background_fullscreen.png b/mobile/assets/loading_photos_background_fullscreen.png
deleted file mode 100644
index 3cbc4e1da8..0000000000
Binary files a/mobile/assets/loading_photos_background_fullscreen.png and /dev/null differ
diff --git a/mobile/assets/lock_screen_background.png b/mobile/assets/lock_screen_background.png
new file mode 100644
index 0000000000..f5b2a9f8d6
Binary files /dev/null and b/mobile/assets/lock_screen_background.png differ
diff --git a/mobile/lib/ui/tools/lock_screen.dart b/mobile/lib/ui/tools/lock_screen.dart
index cd3e99a02d..768c450992 100644
--- a/mobile/lib/ui/tools/lock_screen.dart
+++ b/mobile/lib/ui/tools/lock_screen.dart
@@ -3,6 +3,7 @@ import "dart:io";
import "dart:math";
import 'package:flutter/material.dart';
+import "package:flutter/scheduler.dart";
import "package:flutter_animate/flutter_animate.dart";
import 'package:logging/logging.dart';
import "package:photos/core/configuration.dart";
@@ -44,6 +45,7 @@ class _LockScreenState extends State<LockScreen>
parent: _controller,
curve: Curves.easeInOut,
);
+ late Brightness _platformBrightness;
@override
void initState() {
@@ -58,6 +60,9 @@ class _LockScreenState extends State<LockScreen>
}
_showLockScreen(source: "postFrameInit");
});
+
+ _platformBrightness =
+ SchedulerBinding.instance.platformDispatcher.platformBrightness;
}
@override
@@ -70,10 +75,11 @@ class _LockScreenState extends State<LockScreen>
isTimerRunning ? null : _showLockScreen(source: "tap");
},
child: Container(
- decoration: const BoxDecoration(
+ decoration: BoxDecoration(
image: DecorationImage(
- image: ExactAssetImage(
- 'assets/loading_photos_background_fullscreen.png',
+ opacity: _platformBrightness == Brightness.light ? 0.08 : 0.12,
+ image: const ExactAssetImage(
+ 'assets/lock_screen_background.png',
),
fit: BoxFit.cover,
),