opt.: home ui

- new: top left settings btn
- opt.: top logo
This commit is contained in:
lollipopkit
2024-12-02 21:41:17 +08:00
parent ddd32e82d4
commit 4ace4af7da
6 changed files with 52 additions and 30 deletions

View File

@@ -9,9 +9,26 @@ final class _AppBar extends StatelessWidget implements PreferredSizeWidget {
Widget build(BuildContext context) {
return SizedBox(
height: preferredSize.height,
child: isIOS
? const Center(child: Text(BuildData.name, style: UIs.text15Bold))
: null,
child: isIOS ? Center(child: _buildLogo()) : null,
);
}
Widget _buildLogo() {
final text = Text(
BuildData.name,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: UIs.primaryColor.isBrightColor ? Colors.black : Colors.white,
),
);
return Container(
decoration: BoxDecoration(
color: UIs.primaryColor,
borderRadius: BorderRadius.circular(11),
),
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 1),
child: text,
);
}

View File

@@ -25,16 +25,17 @@ final class _TopBar extends StatelessWidget implements PreferredSizeWidget {
context,
args: const DebugPageArgs(title: 'Logs(${BuildData.build})'),
),
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 7),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 7),
child: Row(
children: [
Text(
BuildData.name,
style: TextStyle(fontSize: 20),
textAlign: TextAlign.center,
Btn.icon(
icon: const Icon(Icons.settings),
onTap: () {
SettingsPage.route.go(context);
},
),
Icon(
const Icon(
Icons.keyboard_arrow_right,
color: Colors.grey,
size: 17,

View File

@@ -70,14 +70,17 @@ class _SettingsPageState extends State<SettingsPage>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: TabBar(
controller: _tabCtrl,
dividerHeight: 0,
tabAlignment: TabAlignment.center,
isScrollable: true,
tabs: SettingsTabs.values
.map((e) => Tab(text: e.i18n))
.toList(growable: false),
appBar: AppBar(
title: Text(libL10n.setting, style: const TextStyle(fontSize: 20)),
bottom: TabBar(
controller: _tabCtrl,
dividerHeight: 0,
tabAlignment: TabAlignment.center,
isScrollable: true,
tabs: SettingsTabs.values
.map((e) => Tab(text: e.i18n))
.toList(growable: false),
),
),
// actions: [
// IconButton(
@@ -134,8 +137,9 @@ final class _AppAboutPageState extends State<AppAboutPage>
),
UIs.height13,
SizedBox(
height: 47,
height: 77,
child: ListView(
padding: const EdgeInsets.symmetric(vertical: 13, horizontal: 7),
scrollDirection: Axis.horizontal,
children: <Widget>[
Btn.elevated(