From 5a886f75044b6775e677329aa3f2312e1aab43cb Mon Sep 17 00:00:00 2001 From: nyne Date: Sat, 22 Feb 2025 19:31:23 +0800 Subject: [PATCH] Improve ui --- assets/translation.json | 6 ++---- lib/pages/comic_details_page/comic_page.dart | 11 +++-------- lib/pages/reader/images.dart | 17 ++++++++++++++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/assets/translation.json b/assets/translation.json index 801d496..4e5dcce 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -338,7 +338,7 @@ "Number of images preloaded": "预加载图片数量", "Ascending": "升序", "Descending": "降序", - "Last Reading: Page @page": "上次阅读: 第 @page 页", + "Last Reading": "上次阅读", "Replies": "回复", "Follow Updates": "追更", "Not Configured": "未配置", @@ -358,7 +358,6 @@ "Once the operation is successful, app will automatically sync data with the server.": "操作成功后, APP将自动与服务器同步数据", "Cache cleared": "缓存已清除", "Disabled": "已禁用", - "Last Reading: @epName Page @page": "上次阅读: @epName 第 @page 页", "WebDAV Auto Sync": "WebDAV 自动同步", "Mark all as read": "全部标记为已读", "Do you want to mark all as read?" : "您要全部标记为已读吗?", @@ -704,7 +703,7 @@ "Number of images preloaded": "預加載圖片數量", "Ascending": "升序", "Descending": "降序", - "Last Reading: Page @page": "上次閱讀: 第 @page 頁", + "Last Reading": "上次閱讀", "Replies": "回覆", "Follow Updates": "追更", "Not Configured": "未配置", @@ -724,7 +723,6 @@ "Once the operation is successful, app will automatically sync data with the server.": "操作成功後, APP將自動與服務器同步數據", "Cache cleared": "緩存已清除", "Disabled": "已禁用", - "Last Reading: @epName Page @page": "上次閱讀: @epName 第 @page 頁", "WebDAV Auto Sync": "WebDAV 自動同步", "Mark all as read": "全部標記為已讀", "Do you want to mark all as read?" : "您要全部標記為已讀嗎?", diff --git a/lib/pages/comic_details_page/comic_page.dart b/lib/pages/comic_details_page/comic_page.dart index fef8424..5447a31 100644 --- a/lib/pages/comic_details_page/comic_page.dart +++ b/lib/pages/comic_details_page/comic_page.dart @@ -372,7 +372,7 @@ class _ComicPageState extends LoadingState padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), decoration: BoxDecoration( color: context.colorScheme.surfaceContainerLow, - borderRadius: BorderRadius.circular(16), + borderRadius: BorderRadius.circular(24), ), child: Row( mainAxisSize: MainAxisSize.min, @@ -395,14 +395,9 @@ class _ComicPageState extends LoadingState .getGroupByIndex(group - 1) .values .elementAt(ep - 1); - text = "Last Reading: @epName Page @page".tlParams({ - 'epName': epName, - 'page': page, - }); + text = "${"Last Reading".tl}: $epName P$page"; } else { - text = "Last Reading: Page @page".tlParams({ - 'page': page, - }); + text = "${"Last Reading".tl}: P$page"; } return Text(text); }, diff --git a/lib/pages/reader/images.dart b/lib/pages/reader/images.dart index 609890a..43932c4 100644 --- a/lib/pages/reader/images.dart +++ b/lib/pages/reader/images.dart @@ -921,10 +921,21 @@ class _SwipeChangeChapterProgressState return CustomPaint( painter: _ProgressPainter( value: value, - backgroundColor: context.colorScheme.surfaceContainer, - color: context.colorScheme.primaryContainer, + backgroundColor: context.colorScheme.surfaceContainerLow, + color: context.colorScheme.surfaceContainerHighest, ), - child: Text(msg).paddingVertical(4).paddingHorizontal(16), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + widget.isPrev ? Icons.arrow_downward : Icons.arrow_upward, + color: context.colorScheme.onSurface, + size: 16, + ), + const SizedBox(width: 4), + Text(msg), + ], + ).paddingVertical(6).paddingHorizontal(16), ); } }