mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 18:46:53 +08:00
opt: popupmenu item
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,7 +12,7 @@ class FontSizeSelectPage extends StatefulWidget {
|
||||
|
||||
class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
Box setting = GStorage.setting;
|
||||
List<double> list = List.generate(12, (index) => 0.85 + index * 0.05);
|
||||
List<double> list = List.generate(16, (index) => 0.85 + index * 0.05);
|
||||
//[0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35];
|
||||
late double minSize;
|
||||
late double maxSize;
|
||||
@@ -29,8 +29,8 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
|
||||
setFontSize() {
|
||||
setting.put(SettingBoxKey.defaultTextScale, currentSize);
|
||||
Get.forceAppUpdate();
|
||||
Get.back(result: currentSize);
|
||||
Get.forceAppUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -38,7 +38,13 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
TextButton(onPressed: () => setFontSize(), child: const Text('确定')),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
currentSize = 1.0;
|
||||
setFontSize();
|
||||
},
|
||||
child: const Text('重置')),
|
||||
TextButton(onPressed: setFontSize, child: const Text('确定')),
|
||||
const SizedBox(width: 12)
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user