新增毛玻璃主题

This commit is contained in:
DelLevin-Home
2026-08-12 22:28:33 +08:00
parent be3299a0b3
commit ad6ab51afd
78 changed files with 672 additions and 237 deletions

View File

@@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'reader_style_sheet.dart';
import '../../widgets/app_overlay.dart';
class ControlPanel extends StatefulWidget {
final bool showControls;
@@ -217,7 +218,7 @@ class _ControlPanelState extends State<ControlPanel> {
void _openStyleSheet() {
widget.onToggleStyleDrawer();
showModalBottomSheet(
appModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,

View File

@@ -17,6 +17,7 @@ import 'epub_edit_page.dart';
import 'epub_highlights_page.dart';
import 'highlight_detail_sheet.dart';
import 'reader_screen.dart';
import '../../widgets/app_overlay.dart';
/// EPUB 书籍详情页
class EpubDetailPage extends StatefulWidget {
@@ -730,7 +731,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
/// 删除摘抄(同步删除蓝色高亮)
Future<void> _deleteExcerpt(BookExcerpt excerpt, ColorScheme colors) async {
final confirmed = showDialog<bool>(
final confirmed = appDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('删除摘抄', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
@@ -774,7 +775,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
}
Future<void> _deleteHighlight(int id, ColorScheme colors) async {
final confirmed = showDialog<bool>(
final confirmed = appDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('删除句读', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
@@ -873,7 +874,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
}
void _showLinkedBookActions(ColorScheme colors, String title) {
showModalBottomSheet(
appModalBottomSheet(
context: context,
backgroundColor: colors.surface,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
@@ -914,7 +915,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
title: Text('取消关联', style: TextStyle(fontSize: 13, color: colors.error)),
onTap: () {
Navigator.pop(ctx);
showDialog(
appDialog(
context: context,
builder: (confirmCtx) => AlertDialog(
title: const Text('取消关联', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),

View File

@@ -6,6 +6,7 @@ import '../../utils/toast_util.dart';
import '../../utils/user_prefs.dart';
import 'highlight_detail_sheet.dart';
import 'reader_screen.dart';
import '../../widgets/app_overlay.dart';
/// EPUB 句读(高亮)管理页面 —— 支持瀑布流/列表模式切换
class EpubHighlightsPage extends StatefulWidget {
@@ -317,7 +318,7 @@ class _EpubHighlightsPageState extends State<EpubHighlightsPage> {
}
void _showDeleteConfirm(int id, ColorScheme colors) {
showDialog(
appDialog(
context: context,
builder: (ctx) => AlertDialog(
backgroundColor: colors.surface,

View File

@@ -8,6 +8,7 @@ import '../../utils/toast_util.dart';
import '../../widgets/fade_in_local_image.dart';
import '../../widgets/shimmer_skeleton.dart';
import 'epub_detail_page.dart';
import '../../widgets/app_overlay.dart';
/// EPUB 书架页面
class EpubLibraryPage extends StatefulWidget {
@@ -88,7 +89,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
}
if (!mounted) return;
showDialog(
appDialog(
context: context,
barrierDismissible: false,
builder: (_) => const Center(child: CircularProgressIndicator()),
@@ -107,7 +108,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
Future<void> _deleteBook(Map<String, dynamic> book) async {
final colors = Theme.of(context).colorScheme;
final confirm = await showDialog<bool>(
final confirm = await appDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
backgroundColor: colors.surface,
@@ -166,7 +167,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
(2, '按阅读进度排序', Icons.auto_stories_outlined),
(3, '按书名排序', Icons.sort_by_alpha),
];
showModalBottomSheet(
appModalBottomSheet(
context: context,
backgroundColor: colors.surface,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../utils/toast_util.dart';
import 'highlight_share_page.dart';
import '../../widgets/app_overlay.dart';
/// 句读详情弹窗 —— 类似分享卡片的样式
/// 从 epub_detail_page 和 epub_highlights_page 共用
@@ -19,7 +20,7 @@ void showHighlightDetailSheet(
final createdAt = highlight['created_at'] as String? ?? '';
final bookTitle = book['title'] as String? ?? '';
showModalBottomSheet(
appModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
isScrollControlled: true,
@@ -246,7 +247,7 @@ void showExcerptDetailSheet(
}) {
final colors = Theme.of(context).colorScheme;
showModalBottomSheet(
appModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
isScrollControlled: true,

View File

@@ -45,7 +45,7 @@ mixin _LinkHandlingMixin on State<ReaderScreen> {
} else if (linkHandling == ReaderLinkHandling.ask) {
if (mounted && context.mounted) {
final shouldOpen =
await showDialog<bool>(
await appDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title: const Text('打开外部链接'),

View File

@@ -23,6 +23,7 @@ import 'footnote_popup.dart';
import 'search_sheet.dart';
import 'epub_selection_toolbar.dart';
import 'selection_handles.dart';
import '../../widgets/app_overlay.dart';
part 'mixins/spine_navigation_mixin.dart';
part 'mixins/page_navigation_mixin.dart';
@@ -439,7 +440,7 @@ class _ReaderScreenState extends State<ReaderScreen>
}
void _openSearch() {
showModalBottomSheet(
appModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../../services/epub/epub_theme.dart';
import 'widgets/integer_stepper.dart';
import 'widgets/reader_scale_slider.dart';
import '../../widgets/app_overlay.dart';
/// Simplified reader style configuration bottom sheet.
///
@@ -382,7 +383,7 @@ class _ReaderStyleSheetState extends State<ReaderStyleSheet> {
Color bgColor = Color(_customBgColor);
Color textColor = Color(_customTextColor);
showDialog(
appDialog(
context: context,
builder: (ctx) {
return StatefulBuilder(