UI Enhancements (#1824)

* Fix button color

* Unify search icon

* Update select button colors

* Modify tap to hide for balance card

* Modify tap to hide constants

* Modify hidden balance behaviour

* Add tap to hide to second value

* Make tap to hide persistent

* Change to switchBalanceValue function

* Fix MWEB card spacing [skip ci]

* Swap buttons on wallets screen [skip ci]
This commit is contained in:
tuxsudo
2024-12-12 10:24:45 +02:00
committed by GitHub
parent 5abd524af3
commit ad34caa5be
8 changed files with 91 additions and 80 deletions
@@ -118,12 +118,7 @@ class CryptoBalanceWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onLongPress: () => dashboardViewModel.balanceViewModel.isReversing =
!dashboardViewModel.balanceViewModel.isReversing,
onLongPressUp: () => dashboardViewModel.balanceViewModel.isReversing =
!dashboardViewModel.balanceViewModel.isReversing,
child: SingleChildScrollView(
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@@ -459,7 +454,6 @@ class CryptoBalanceWidget extends StatelessWidget {
}),
],
),
),
);
}
@@ -597,44 +591,47 @@ class BalanceRowWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
GestureDetector(
onTap: () => dashboardViewModel.balanceViewModel.switchBalanceValue(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: hasAdditionalBalance
? () => _showBalanceDescription(
context, S.of(context).available_balance_description)
: null,
child: Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Semantics(
hint: 'Double tap to see more information',
container: true,
child: Text('${availableBalanceLabel}',
style: TextStyle(
fontSize: 12,
fontFamily: 'Lato',
fontWeight: FontWeight.w400,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.labelTextColor,
height: 1)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: hasAdditionalBalance
? () => _showBalanceDescription(
context, S.of(context).available_balance_description)
: null,
child: Row(
children: [
Semantics(
hint: 'Double tap to see more information',
container: true,
child: Text('${availableBalanceLabel}',
style: TextStyle(
fontSize: 12,
fontFamily: 'Lato',
fontWeight: FontWeight.w400,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.labelTextColor,
height: 1)),
),
if (hasAdditionalBalance)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: Icon(Icons.help_outline,
size: 16,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.labelTextColor),
),
],
),
if (hasAdditionalBalance)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4),
child: Icon(Icons.help_outline,
size: 16,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.labelTextColor),
),
],
),
SizedBox(height: 6),
AutoSizeText(availableBalance,
@@ -667,9 +664,10 @@ class BalanceRowWidget extends StatelessWidget {
fontWeight: FontWeight.w500,
color: Theme.of(context).extension<BalancePageTheme>()!.textColor,
height: 1)),
],
),
),
SizedBox(
width: min(MediaQuery.of(context).size.width * 0.2, 100),
child: Center(
@@ -712,6 +710,7 @@ class BalanceRowWidget extends StatelessWidget {
),
],
),
),
if (frozenBalance.isNotEmpty)
GestureDetector(
behavior: HitTestBehavior.opaque,
@@ -778,7 +777,9 @@ class BalanceRowWidget extends StatelessWidget {
),
),
if (hasAdditionalBalance)
Column(
GestureDetector(
onTap: () => dashboardViewModel.balanceViewModel.switchBalanceValue(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24),
@@ -821,12 +822,13 @@ class BalanceRowWidget extends StatelessWidget {
),
],
),
),
],
),
),
),
if (hasSecondAdditionalBalance || hasSecondAvailableBalance) ...[
SizedBox(height: 16),
SizedBox(height: 10),
Container(
margin: const EdgeInsets.only(left: 16, right: 16),
decoration: BoxDecoration(
@@ -881,7 +883,9 @@ class BalanceRowWidget extends StatelessWidget {
],
),
if (hasSecondAvailableBalance)
Row(
GestureDetector(
onTap: () => dashboardViewModel.balanceViewModel.switchBalanceValue(),
child: Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -953,6 +957,7 @@ class BalanceRowWidget extends StatelessWidget {
),
],
),
),
],
),
),