From 828bb4ca94013466c8a29bf63796cf2d36c4a156 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Mon, 29 Jun 2026 19:39:00 +0800 Subject: [PATCH] =?UTF-8?q?style(client):=20toast=20=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E6=98=8E=E6=9A=97=E4=B8=BB=E9=A2=98(1.0.25)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 真相源/主题里原无 toast 定义,SnackBar 用 Material 默认黑底,明亮主题下突兀。 PangolinTheme 加 snackBarTheme:surface 底 + fg1 字 + 描边圆角(与卡片同风格)、floating, 浅色得浅 toast、深色得深 toast。自动连接的 toast 随之适配。 Co-Authored-By: Claude Opus 4.8 --- client/lib/pangolin_theme.dart | 13 +++++++++++++ client/pubspec.yaml | 2 +- client/windows/installer/pangolin.iss | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/client/lib/pangolin_theme.dart b/client/lib/pangolin_theme.dart index 74b7412..871ce07 100644 --- a/client/lib/pangolin_theme.dart +++ b/client/lib/pangolin_theme.dart @@ -289,6 +289,19 @@ class PangolinTheme { borderRadius: BorderRadius.circular(PangolinRadius.lg), ), ), + // toast / SnackBar:跟随明暗主题(surface 底 + fg1 字 + 描边圆角,与卡片同风格), + // 不再用 Material 默认的突兀黑底。 + snackBarTheme: SnackBarThemeData( + backgroundColor: s.surface, + contentTextStyle: PangolinFonts.manrope(fontWeight: FontWeight.w600, fontSize: 14) + .copyWith(color: s.fg1), + behavior: SnackBarBehavior.floating, + elevation: 6, + shape: RoundedRectangleBorder( + side: BorderSide(color: s.border), + borderRadius: BorderRadius.circular(PangolinRadius.md), + ), + ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: s.bg, diff --git a/client/pubspec.yaml b/client/pubspec.yaml index 41444ba..64986a3 100644 --- a/client/pubspec.yaml +++ b/client/pubspec.yaml @@ -1,7 +1,7 @@ name: pangolin_vpn description: 穿山甲 · Pangolin — 极简、稳定、跨平台网络加速客户端。 publish_to: "none" -version: 1.0.24+25 +version: 1.0.25+26 environment: sdk: ^3.5.0 diff --git a/client/windows/installer/pangolin.iss b/client/windows/installer/pangolin.iss index 15da85a..18f93ca 100644 --- a/client/windows/installer/pangolin.iss +++ b/client/windows/installer/pangolin.iss @@ -3,7 +3,7 @@ ; 前置: 先在 client/ 跑 `flutter build windows`(Release),产物在 ; ..\..\build\windows\x64\runner\Release #define MyAppName "穿山甲 Pangolin" -#define MyAppVersion "1.0.24" +#define MyAppVersion "1.0.25" #define MyAppPublisher "Pangolin" #define MyAppExeName "pangolin_vpn.exe" #define BuildDir "..\..\build\windows\x64\runner\Release"