mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-16 14:14:01 +08:00
tweaks (#2100)
* mod: pgc episode title * opt: ColorScheme.of * mod: mpv api version * opt: log handler * opt: ext
This commit is contained in:
committed by
GitHub
parent
24769e144f
commit
b33fdf14af
@@ -16,7 +16,7 @@ class ToolbarIconButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
return SizedBox(
|
||||
width: 36,
|
||||
height: 36,
|
||||
@@ -24,14 +24,14 @@ class ToolbarIconButton extends StatelessWidget {
|
||||
tooltip: tooltip,
|
||||
onPressed: onPressed,
|
||||
icon: icon,
|
||||
highlightColor: theme.colorScheme.secondaryContainer,
|
||||
highlightColor: colorScheme.secondaryContainer,
|
||||
color: selected
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: theme.colorScheme.outline,
|
||||
? colorScheme.onSecondaryContainer
|
||||
: colorScheme.outline,
|
||||
style: ButtonStyle(
|
||||
padding: const WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
selected ? theme.colorScheme.secondaryContainer : null,
|
||||
selected ? colorScheme.secondaryContainer : null,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -69,12 +69,12 @@ Future<void> importFromClipBoard<T>(
|
||||
executeImport = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final theme = Theme.of(context);
|
||||
final isDark = theme.brightness.isDark;
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
final isDark = colorScheme.isDark;
|
||||
if (isDark != isDarkMode) {
|
||||
isDarkMode = isDark;
|
||||
renderer = TextSpanRenderer(
|
||||
const TextStyle(),
|
||||
null,
|
||||
isDark ? githubDarkTheme : githubTheme,
|
||||
);
|
||||
result.render(renderer);
|
||||
@@ -87,12 +87,7 @@ Future<void> importFromClipBoard<T>(
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: Get.back,
|
||||
child: Text(
|
||||
'取消',
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
child: Text('取消', style: TextStyle(color: colorScheme.outline)),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Get.back(result: true),
|
||||
|
||||
Reference in New Issue
Block a user