Polish manager icons, alignment and card spacing

This commit is contained in:
tongtong committed 2026-11-16 11:42:37 +08:00
1 parent 40ff016f6b
commit e12cb76d68
3 files changed
+219 -68

No files matched your search

+38 -13
View File
@@ -76,7 +76,13 @@ class _ManagerViewState extends State<ManagerView> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
leading: Icon(icon, color: Colors.blueGrey, size: 21),
leading: Icon(
icon,
color: page == i
? const Color(0xFF305DDB)
: Colors.blueGrey,
size: 21,
),
title: Text(
title,
style: const TextStyle(
@@ -115,6 +121,19 @@ class _ManagerViewState extends State<ManagerView> {
),
),
),
Container(
width: 1,
decoration: const BoxDecoration(
color: Color(0xFFD5DCE8),
boxShadow: [
BoxShadow(
color: Color(0x1A000000),
blurRadius: 6,
offset: Offset(1, 0),
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -300,7 +319,7 @@ class _ManagerViewState extends State<ManagerView> {
),
),
const SizedBox(width: 16),
OutlinedButton(
OutlinedButton.icon(
onPressed: m.repository.sessions.isEmpty
? null
: () => m.action(() async {
@@ -308,7 +327,8 @@ class _ManagerViewState extends State<ManagerView> {
await m.disconnect(id);
}
}),
child: const Text('断开全部'),
icon: const Icon(Icons.link_off, size: 16),
label: const Text('断开全部'),
),
],
),
@@ -422,9 +442,10 @@ class _ManagerViewState extends State<ManagerView> {
),
const SizedBox(width: 12),
if (s == null)
FilledButton(
FilledButton.icon(
onPressed: pending || d.busy ? null : () => m.connect(d),
child: const Text('连接设备'),
icon: const Icon(Icons.add_link, size: 16),
label: const Text('连接设备'),
)
else
Wrap(
@@ -453,9 +474,10 @@ class _ManagerViewState extends State<ManagerView> {
: '独立窗口投屏',
),
),
OutlinedButton(
OutlinedButton.icon(
onPressed: pending ? null : () => m.disconnect(d.id),
child: const Text('断开'),
icon: const Icon(Icons.link_off, size: 16),
label: const Text('断开'),
),
],
),
@@ -523,7 +545,7 @@ class _ManagerViewState extends State<ManagerView> {
icon: const Icon(Icons.refresh),
label: const Text('读取设备列表'),
),
OutlinedButton(
OutlinedButton.icon(
onPressed: () => m.action(() async {
final result = await m.repository.run(m.repository.settings.adb, [
'start-server',
@@ -531,7 +553,8 @@ class _ManagerViewState extends State<ManagerView> {
m.log(result.isEmpty ? 'ADB Server 已启动' : result);
await m.localAdb();
}),
child: const Text('启动 ADB Server'),
icon: const Icon(Icons.play_arrow, size: 16),
label: const Text('启动 ADB Server'),
),
],
),
@@ -569,14 +592,16 @@ class _ManagerViewState extends State<ManagerView> {
),
),
const Spacer(),
TextButton(
TextButton.icon(
onPressed: m.openLogDirectory,
child: const Text('打开日志文件夹'),
icon: const Icon(Icons.folder_open, size: 16),
label: const Text('打开日志文件夹'),
),
TextButton(
TextButton.icon(
onPressed: () =>
Clipboard.setData(ClipboardData(text: m.logs.join('\n'))),
child: const Text('复制日志'),
icon: const Icon(Icons.copy, size: 16),
label: const Text('复制日志'),
),
],
),