mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-11 12:37:46 +08:00
tweaks (#2032)
* fix: 1080p * opt: import export * opt: downloader * opt: skeleton * opt: parseColor * tweak * opt: sb seek * opt: rxn
This commit is contained in:
committed by
GitHub
parent
b7b40c557e
commit
f5dbfcec79
@@ -45,7 +45,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
final padding = MediaQuery.viewPaddingOf(context);
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
@@ -74,7 +74,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
slivers: [
|
||||
Obx(
|
||||
() => _buildAppBar(
|
||||
theme,
|
||||
colorScheme,
|
||||
padding,
|
||||
_controller.topState.value,
|
||||
),
|
||||
@@ -83,7 +83,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
final allSortBy = _controller.topicSortByConf.value?.allSortBy;
|
||||
if (allSortBy != null && allSortBy.isNotEmpty) {
|
||||
return SliverPinnedHeader(
|
||||
backgroundColor: theme.colorScheme.surface,
|
||||
backgroundColor: colorScheme.surface,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 12 + padding.left,
|
||||
@@ -93,8 +93,8 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
return ToggleButtons(
|
||||
fillColor: theme.colorScheme.secondaryContainer,
|
||||
selectedColor: theme.colorScheme.onSecondaryContainer,
|
||||
fillColor: colorScheme.secondaryContainer,
|
||||
selectedColor: colorScheme.onSecondaryContainer,
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 54,
|
||||
minHeight: 24,
|
||||
@@ -148,7 +148,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
}
|
||||
|
||||
Widget _buildAppBar(
|
||||
ThemeData theme,
|
||||
ColorScheme colorScheme,
|
||||
EdgeInsets padding,
|
||||
LoadingState<TopDetails?> topState,
|
||||
) {
|
||||
@@ -205,7 +205,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
),
|
||||
Text(
|
||||
' 发起',
|
||||
style: TextStyle(color: theme.colorScheme.outline),
|
||||
style: TextStyle(color: colorScheme.outline),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -221,7 +221,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
const SizedBox(height: 6),
|
||||
SelectableText(
|
||||
response.topicItem!.description!,
|
||||
style: TextStyle(color: theme.colorScheme.onSurfaceVariant),
|
||||
style: TextStyle(color: colorScheme.onSurfaceVariant),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
@@ -230,7 +230,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
'${NumUtils.numFormat(response.topicItem!.view)}浏览 · ${NumUtils.numFormat(response.topicItem!.discuss)}讨论',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: theme.colorScheme.outline,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
@@ -238,13 +238,11 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
color: theme.colorScheme.outline.withValues(
|
||||
alpha: 0.2,
|
||||
),
|
||||
color: colorScheme.outline.withValues(alpha: 0.2),
|
||||
),
|
||||
foregroundColor: _controller.isLike.value == true
|
||||
foregroundColor: _controller.isLike.value
|
||||
? null
|
||||
: theme.colorScheme.onSurfaceVariant,
|
||||
: colorScheme.onSurfaceVariant,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
visualDensity: const VisualDensity(
|
||||
horizontal: -4,
|
||||
@@ -253,7 +251,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
onPressed: _controller.onLike,
|
||||
icon: _controller.isLike.value == true
|
||||
icon: _controller.isLike.value
|
||||
? const Icon(FontAwesomeIcons.solidThumbsUp, size: 13)
|
||||
: const Icon(FontAwesomeIcons.thumbsUp, size: 13),
|
||||
label: Text(
|
||||
@@ -267,22 +265,17 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
color: theme.colorScheme.outline.withValues(
|
||||
alpha: 0.2,
|
||||
),
|
||||
color: colorScheme.outline.withValues(alpha: 0.2),
|
||||
),
|
||||
foregroundColor: _controller.isFav.value == true
|
||||
foregroundColor: _controller.isFav.value
|
||||
? null
|
||||
: theme.colorScheme.onSurfaceVariant,
|
||||
: colorScheme.onSurfaceVariant,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
visualDensity: const VisualDensity(
|
||||
horizontal: -4,
|
||||
vertical: -4,
|
||||
),
|
||||
visualDensity: const .new(horizontal: -4, vertical: -4),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
onPressed: _controller.onFav,
|
||||
icon: _controller.isFav.value == true
|
||||
icon: _controller.isFav.value
|
||||
? const Icon(FontAwesomeIcons.solidStar, size: 13)
|
||||
: const Icon(FontAwesomeIcons.star, size: 13),
|
||||
label: Text(
|
||||
@@ -311,7 +304,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
PopupMenuItem(
|
||||
onTap: _controller.onFav,
|
||||
child: Text(
|
||||
'${_controller.isFav.value == true ? '取消' : ''}收藏',
|
||||
'${_controller.isFav.value ? '取消' : ''}收藏',
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
@@ -322,7 +315,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
|
||||
return;
|
||||
}
|
||||
PageUtils.inAppWebview(
|
||||
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&${ThemeUtils.themeUrl(theme.isDark)}',
|
||||
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&${ThemeUtils.themeUrl(colorScheme.isDark)}',
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user