From e80d115e4f045be71473a9f7bc103348ec913c1a Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Thu, 2 Nov 2023 20:27:17 -0600 Subject: [PATCH] opt.: server detail page --- lib/view/page/server/detail.dart | 29 +++++++++++++---------------- lib/view/page/server/tab.dart | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/lib/view/page/server/detail.dart b/lib/view/page/server/detail.dart index 9f5ca9a0..2c10ae32 100644 --- a/lib/view/page/server/detail.dart +++ b/lib/view/page/server/detail.dart @@ -133,22 +133,20 @@ class _ServerDetailPageState extends State return CardX( ExpandTile( - title: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - _buildAnimatedText( - ValueKey(percent), - '$percent%', - UIs.textSize27, - ), - Row( - mainAxisSize: MainAxisSize.min, - children: details, - ), - ], + title: Align( + alignment: Alignment.centerLeft, + child: _buildAnimatedText( + ValueKey(percent), + '$percent%', + UIs.textSize27, + ), ), childrenPadding: const EdgeInsets.symmetric(vertical: 13), initiallyExpanded: ss.cpu.coresCount <= 8, + trailing: Row( + mainAxisSize: MainAxisSize.min, + children: details, + ), children: _buildCPUProgress(ss.cpu), ), ); @@ -317,7 +315,7 @@ class _ServerDetailPageState extends State return CardX( ExpandTile( title: Text(l10n.disk), - childrenPadding: EdgeInsets.zero, + childrenPadding: const EdgeInsets.only(bottom: 7), leading: const Icon(Icons.storage, size: 17), initiallyExpanded: children.length <= 7, children: children, @@ -421,7 +419,7 @@ class _ServerDetailPageState extends State Widget _buildNetSpeedItem(NetSpeed ns, String device) { return Padding( - padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 17), + padding: const EdgeInsets.symmetric(vertical: 11, horizontal: 17), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -493,7 +491,6 @@ class _ServerDetailPageState extends State text, style: style, textScaleFactor: _textFactor, - textAlign: TextAlign.left, ), transitionBuilder: (child, animation) => FadeTransition( opacity: animation, diff --git a/lib/view/page/server/tab.dart b/lib/view/page/server/tab.dart index 2386914d..9deef58c 100644 --- a/lib/view/page/server/tab.dart +++ b/lib/view/page/server/tab.dart @@ -491,7 +491,7 @@ class _ServerPageState extends State if (onTap == null) return child; return IconButton( key: key, - padding: const EdgeInsets.symmetric(horizontal: 7), + padding: const EdgeInsets.symmetric(horizontal: 3), onPressed: onTap, icon: child, );