From eff2d7d539993f6525feb5edbbb9cd6a83e11892 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 20 Sep 2023 13:13:44 -0600 Subject: [PATCH] center desktop tor button in menu --- .../desktop/desktop_tor_status_button.dart | 84 ++++++++++--------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/lib/widgets/desktop/desktop_tor_status_button.dart b/lib/widgets/desktop/desktop_tor_status_button.dart index 8b7e96ec2..da429e9ec 100644 --- a/lib/widgets/desktop/desktop_tor_status_button.dart +++ b/lib/widgets/desktop/desktop_tor_status_button.dart @@ -120,50 +120,56 @@ class _DesktopTorStatusButtonState extends ConsumerState .extension()! .getDesktopMenuButtonStyle(context), onPressed: widget.onPressed, - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 16, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - AnimatedContainer( - duration: widget.transitionDuration, - width: _iconOnly ? 0 : 16, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + vertical: 16, ), - SvgPicture.asset( - Assets.svg.tor, - color: _color(_torConnectionStatus), - width: 20, - height: 20, - ), - AnimatedOpacity( - duration: widget.transitionDuration, - opacity: _iconOnly ? 0 : 1.0, - child: SizeTransition( - sizeFactor: animationController, - axis: Axis.horizontal, - axisAlignment: -1, - child: SizedBox( - width: labelLength, - child: Row( - children: [ - const SizedBox( - width: 12, - ), - Text( - _torConnectionStatus.name.capitalize(), - style: STextStyles.smallMed12(context).copyWith( - color: _color(_torConnectionStatus), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AnimatedContainer( + duration: widget.transitionDuration, + width: _iconOnly ? 0 : 16, + ), + SvgPicture.asset( + Assets.svg.tor, + color: _color(_torConnectionStatus), + width: 20, + height: 20, + ), + AnimatedOpacity( + duration: widget.transitionDuration, + opacity: _iconOnly ? 0 : 1.0, + child: SizeTransition( + sizeFactor: animationController, + axis: Axis.horizontal, + axisAlignment: -1, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox( + width: 12, ), - ), - ], + Text( + _torConnectionStatus.name.capitalize(), + style: STextStyles.smallMed12(context).copyWith( + color: _color(_torConnectionStatus), + ), + ), + const SizedBox( + width: 21, + ), + ], + ), ), ), - ), + ], ), - ], - ), + ), + ], ), ); }