mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-18 09:36:52 +08:00
set desktop brightness if needed
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -47,6 +47,7 @@ class _MainAppState extends PopScopeState<MainApp>
|
|||||||
late final _setting = GStorage.setting;
|
late final _setting = GStorage.setting;
|
||||||
late EdgeInsets _padding;
|
late EdgeInsets _padding;
|
||||||
late ThemeData theme;
|
late ThemeData theme;
|
||||||
|
Brightness? _brightness;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get initCanPop => false;
|
bool get initCanPop => false;
|
||||||
@@ -78,7 +79,10 @@ class _MainAppState extends PopScopeState<MainApp>
|
|||||||
NetworkImgLayer.reduce =
|
NetworkImgLayer.reduce =
|
||||||
NetworkImgLayer.reduceLuxColor != null && brightness.isDark;
|
NetworkImgLayer.reduceLuxColor != null && brightness.isDark;
|
||||||
if (PlatformUtils.isDesktop) {
|
if (PlatformUtils.isDesktop) {
|
||||||
windowManager.setBrightness(brightness);
|
if (_brightness != brightness) {
|
||||||
|
_brightness = brightness;
|
||||||
|
windowManager.setBrightness(brightness);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!_mainController.useSideBar) {
|
if (!_mainController.useSideBar) {
|
||||||
_mainController.useBottomNav = MediaQuery.sizeOf(context).isPortrait;
|
_mainController.useBottomNav = MediaQuery.sizeOf(context).isPortrait;
|
||||||
|
|||||||
Reference in New Issue
Block a user