desktop file transfer update UI style

This commit is contained in:
csf 2022-10-19 23:59:02 +09:00
parent 04398ef54e
commit 9623123e9f

View File

@ -546,13 +546,6 @@ class _FileManagerPageState extends State<FileManagerPage>
children: [ children: [
Row( Row(
children: [ children: [
IconButton(
onPressed: () {
model.goHome(isLocal: isLocal);
},
icon: const Icon(Icons.home_outlined),
splashRadius: 20,
),
IconButton( IconButton(
icon: const Icon(Icons.arrow_back), icon: const Icon(Icons.arrow_back),
splashRadius: 20, splashRadius: 20,
@ -649,6 +642,13 @@ class _FileManagerPageState extends State<FileManagerPage>
mainAxisAlignment: mainAxisAlignment:
isLocal ? MainAxisAlignment.start : MainAxisAlignment.end, isLocal ? MainAxisAlignment.start : MainAxisAlignment.end,
children: [ children: [
IconButton(
onPressed: () {
model.goHome(isLocal: isLocal);
},
icon: const Icon(Icons.home_outlined),
splashRadius: 20,
),
IconButton( IconButton(
onPressed: () { onPressed: () {
final name = TextEditingController(); final name = TextEditingController();
@ -789,8 +789,7 @@ class _FileManagerPageState extends State<FileManagerPage>
child: BreadCrumb( child: BreadCrumb(
items: items, items: items,
divider: Text("/", divider: Text("/",
style: TextStyle(color: Theme.of(context).hintColor)) style: TextStyle(color: Theme.of(context).hintColor)),
.paddingSymmetric(horizontal: 2.0),
overflow: ScrollableOverflow( overflow: ScrollableOverflow(
controller: getBreadCrumbScrollController(isLocal)), controller: getBreadCrumbScrollController(isLocal)),
)), )),
@ -833,15 +832,21 @@ class _FileManagerPageState extends State<FileManagerPage>
await model.fetchDirectory("/", isLocal, isLocal); await model.fetchDirectory("/", isLocal, isLocal);
for (var entry in fd.entries) { for (var entry in fd.entries) {
menuItems.add(MenuEntryButton( menuItems.add(MenuEntryButton(
childBuilder: (TextStyle? style) => Text( childBuilder: (TextStyle? style) =>
entry.name, Row(children: [
style: style, Icon(Icons.computer,
), color: style?.color,
size: style?.fontSize),
SizedBox(width: 10),
Text(
entry.name,
style: style,
)
]),
proc: () { proc: () {
openDirectory(entry.name, isLocal: isLocal); openDirectory(entry.name, isLocal: isLocal);
}, },
dismissOnClicked: true)); dismissOnClicked: true));
menuItems.add(MenuEntryDivider());
} }
} finally { } finally {
if (!isLocal) { if (!isLocal) {
@ -849,7 +854,7 @@ class _FileManagerPageState extends State<FileManagerPage>
} }
} }
} }
menuItems.add(MenuEntryDivider());
mod_menu.showMenu( mod_menu.showMenu(
context: context, context: context,
position: RelativeRect.fromLTRB(x, y, x, y), position: RelativeRect.fromLTRB(x, y, x, y),
@ -879,10 +884,11 @@ class _FileManagerPageState extends State<FileManagerPage>
final breadCrumbList = List<BreadCrumbItem>.empty(growable: true); final breadCrumbList = List<BreadCrumbItem>.empty(growable: true);
breadCrumbList.addAll(list.asMap().entries.map((e) => BreadCrumbItem( breadCrumbList.addAll(list.asMap().entries.map((e) => BreadCrumbItem(
content: TextButton( content: TextButton(
child: Text(e.value), child: Text(e.value),
style: style: ButtonStyle(
ButtonStyle(minimumSize: MaterialStateProperty.all(Size(0, 0))), minimumSize: MaterialStateProperty.all(Size(0, 0))),
onPressed: () => onPressed(list.sublist(0, e.key + 1)))))); onPressed: () => onPressed(list.sublist(0, e.key + 1)))
.marginSymmetric(horizontal: 4))));
return breadCrumbList; return breadCrumbList;
} }