Add option to hide time and battery info.

This commit is contained in:
pkuislm
2024-11-11 22:40:46 +08:00
parent b3e95d7162
commit 93bf99daa5
4 changed files with 27 additions and 13 deletions

View File

@@ -426,17 +426,21 @@ class _ReaderScaffoldState extends State<_ReaderScaffold> {
}
Widget buildStatusInfo() {
return Positioned(
bottom: 13,
right: 25,
child: Row(
children: [
_ClockWidget(),
const SizedBox(width: 10),
_BatteryWidget(),
],
),
);
if(appdata.settings['enableClockAndBatteryInfoInReader']) {
return Positioned(
bottom: 13,
right: 25,
child: Row(
children: [
_ClockWidget(),
const SizedBox(width: 10),
_BatteryWidget(),
],
),
);
} else {
return const SizedBox.shrink();
}
}
void openChapterDrawer() {

View File

@@ -77,6 +77,13 @@ class _ReaderSettingsState extends State<ReaderSettings> {
widget.onChanged?.call('enableTurnPageByVolumeKey');
},
).toSliver(),
_SwitchSetting(
title: "Display time & battery info in reader".tl,
settingKey: "enableClockAndBatteryInfoInReader",
onChanged: () {
widget.onChanged?.call("enableClockAndBatteryInfoInReader");
},
).toSliver(),
],
);
}