#485 viewer: do not keep max brightness when viewing info
This commit is contained in:
parent
cbfba1c156
commit
32868ea058
2 changed files with 7 additions and 3 deletions
|
@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
- Video: optional gestures to adjust brightness/volume
|
||||
|
||||
### Changed
|
||||
|
||||
- Viewer: do not keep max brightness when viewing info
|
||||
|
||||
## <a id="v1.7.9"></a>[v1.7.9] - 2023-01-15
|
||||
|
||||
### Added
|
||||
|
|
|
@ -286,10 +286,10 @@ class _ViewerVerticalPageViewState extends State<ViewerVerticalPageView> {
|
|||
final opacity = min(1.0, page);
|
||||
_backgroundOpacityNotifier.value = opacity * opacity;
|
||||
|
||||
if (page <= 1 && settings.viewerMaxBrightness) {
|
||||
if (settings.viewerMaxBrightness) {
|
||||
_systemBrightness?.then((system) {
|
||||
final transition = max(system, lerpDouble(system, maximumBrightness, page / 2)!);
|
||||
ScreenBrightness().setScreenBrightness(transition);
|
||||
final value = lerpDouble(maximumBrightness, system, ((1 - page).abs() * 2).clamp(0, 1))!;
|
||||
ScreenBrightness().setScreenBrightness(value);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue