opt: window title bar (#672)

* opt: window title bar

* rm: `VirtualWindowFrame` on `SettingsPage`
This commit is contained in:
Noo6
2025-01-10 15:19:03 +08:00
committed by GitHub
parent e7a5f43cc4
commit 0ae0241800
20 changed files with 24 additions and 24 deletions

View File

@@ -60,7 +60,7 @@ class _ContainerPageState extends State<ContainerPage> {
builder: (_, __) => Consumer<ContainerProvider>(
builder: (_, ___, __) {
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
centerTitle: true,
title: TwoLineText(up: l10n.container, down: widget.spi.name),
actions: [

View File

@@ -107,7 +107,7 @@ class _EditorPageState extends State<EditorPage> {
}
PreferredSizeWidget _buildAppBar() {
return CustomAppBar(
return AppBar(
centerTitle: true,
title: TwoLineText(
up: widget.args?.title ??

View File

@@ -26,8 +26,8 @@ class _IPerfPageState extends State<IPerfPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(
title: Text('iperf'),
appBar: AppBar(
title: const Text('iperf'),
),
body: _buildBody(),
floatingActionButton: _buildFAB(),

View File

@@ -78,7 +78,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
);
}
CustomAppBar _buildAppBar() {
AppBar _buildAppBar() {
final actions = [
IconButton(
tooltip: libL10n.delete,
@@ -101,7 +101,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
icon: const Icon(Icons.delete),
)
];
return CustomAppBar(
return AppBar(
title: Text(libL10n.edit),
actions: widget.pki == null ? null : actions,
);

View File

@@ -123,7 +123,7 @@ class _ProcessPageState extends State<ProcessPage> {
);
}
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
centerTitle: true,
title: TwoLineText(up: widget.spi.name, down: l10n.process),
actions: actions,

View File

@@ -52,7 +52,7 @@ final class _PvePageState extends State<PvePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: TwoLineText(up: 'PVE', down: widget.spi.name),
actions: [
ValBuilder(

View File

@@ -87,7 +87,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
final s = widget.spi.server;
if (s == null) {
return Scaffold(
appBar: const CustomAppBar(),
appBar: AppBar(),
body: Center(child: Text(libL10n.empty)),
);
}
@@ -120,8 +120,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
);
}
CustomAppBar _buildAppBar(Server si) {
return CustomAppBar(
AppBar _buildAppBar(Server si) {
return AppBar(
title: Hero(
tag: 'home_card_title_${si.spi.id}',
transitionOnUserGestures: true,

View File

@@ -110,7 +110,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
return GestureDetector(
onTap: () => _focusScope.unfocus(),
child: Scaffold(
appBar: CustomAppBar(title: Text(libL10n.edit), actions: actions),
appBar: AppBar(title: Text(libL10n.edit), actions: actions),
body: _buildForm(),
floatingActionButton: _buildFAB(),
),

View File

@@ -17,7 +17,7 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(title: Text('Android')),
appBar: AppBar(title: const Text('Android')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [

View File

@@ -27,7 +27,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(title: Text('iOS')),
appBar: AppBar(title: const Text('iOS')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [

View File

@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: Text(l10n.serverDetailOrder)),
appBar: AppBar(title: Text(l10n.serverDetailOrder)),
body: _buildBody(),
);
}

View File

@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: Text(l10n.sequence)),
appBar: AppBar(title: Text(l10n.sequence)),
body: _buildBody(),
);
}

View File

@@ -16,7 +16,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: Text(l10n.serverOrder)),
appBar: AppBar(title: Text(l10n.serverOrder)),
body: _buildBody(),
);
}

View File

@@ -17,7 +17,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: Text(l10n.editVirtKeys)),
appBar: AppBar(title: Text(l10n.editVirtKeys)),
body: Column(
children: [
Padding(

View File

@@ -38,7 +38,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: Text(libL10n.edit),
actions: _buildAppBarActions(),
),

View File

@@ -11,7 +11,7 @@ class SnippetResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: Text(l10n.result)),
appBar: AppBar(title: Text(l10n.result)),
body: _buildBody(),
);
}

View File

@@ -53,7 +53,7 @@ class _LocalFilePageState extends State<LocalFilePage>
super.build(context);
final title = _path.path.fileNameGetter ?? libL10n.file;
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: AnimatedSwitcher(
duration: Durations.short3,
child: Text(title, key: ValueKey(title)),

View File

@@ -62,7 +62,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
if (isDesktop) children.add(_buildRefreshBtn());
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: TwoLineText(up: 'SFTP', down: widget.spi.name),
actions: children,
),

View File

@@ -16,7 +16,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: Text(l10n.mission, style: UIs.text18),
),
body: _buildBody(),

View File

@@ -42,7 +42,7 @@ final class _SystemdPageState extends State<SystemdPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
appBar: AppBar(
title: const Text('Systemd'),
actions: isDesktop
? [Btn.icon(icon: const Icon(Icons.refresh), onTap: _pro.getUnits)]