use Shad color scheme for workspace surfaces

This commit is contained in:
ngfchl
2026-07-18 19:48:16 +08:00
parent 71042fb1a5
commit 517fdafb8a
4 changed files with 31 additions and 112 deletions
+4 -15
View File
@@ -132,7 +132,7 @@ class _FileListTileState extends State<FileListTile> {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
final isDark = theme.brightness == Brightness.dark;
final cs = theme.colorScheme;
return ShadContextMenuRegion(
items: [
ShadContextMenuItem.inset(
@@ -210,20 +210,9 @@ class _FileListTileState extends State<FileListTile> {
padding: const EdgeInsets.symmetric(horizontal: 12),
decoration: BoxDecoration(
color: widget.isSelected
? (isDark
? theme.colorScheme.primary.withAlpha(30)
: theme.colorScheme.primary.withAlpha(15))
: (isDark
? Colors.white.withAlpha(3)
: Colors.black.withAlpha(2)),
border: Border(
bottom: BorderSide(
color: isDark
? Colors.white.withAlpha(10)
: Colors.black.withAlpha(8),
width: 0.5,
),
),
? cs.primary.withValues(alpha: 0.14)
: cs.card,
border: Border(bottom: BorderSide(color: cs.border, width: 0.5)),
),
child: Row(
children: [
+3 -11
View File
@@ -18,21 +18,13 @@ class SortMenu extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
final cs = theme.colorScheme;
final isDark = theme.brightness == Brightness.dark;
final cs = ShadTheme.of(context).colorScheme;
return Container(
height: 36,
decoration: BoxDecoration(
color: isDark
? cs.secondary.withValues(alpha: 0.88)
: Colors.white.withValues(alpha: 0.46),
color: cs.secondary,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: isDark
? cs.border.withValues(alpha: 0.9)
: Colors.white.withValues(alpha: 0.54),
),
border: Border.all(color: cs.border),
),
child: Row(
mainAxisSize: MainAxisSize.min,