Cw 1018 minor UI enhancements (#2118)
* fix ui for monero batch sending * minor ui fixes * Revert "fix ui for monero batch sending" This reverts commit 4827b17bfeefe897dc7b6580d0520ff02aa9683f. * fix: focus node issue
Serhii committed
Mar 28, 2025 at 00:18 UTC
be81042a0610e5ff7d00a9dc9e6948cd5bf982a2
4 files changed
+60
-50
lib/src/screens/new_wallet/wallet_group_description_page.dart
+32
-28
@@ -29,37 +29,41 @@ class WalletGroupDescriptionPage extends BasePage {
29
Image.asset(currentTheme.type.walletGroupImage, height: 200),
30
SizedBox(height: 32),
31
Expanded(
32
- child: Text.rich(
33
- TextSpan(
34
- children: [
35
- TextSpan(text: '${S.of(context).wallet_group_description_one} '),
32
+ child: Scrollbar(
33
+ child: SingleChildScrollView(
34
+ child: Text.rich(
35
TextSpan(
37
- text: '${S.of(context).wallet_group.toLowerCase()} ',
38
- style: TextStyle(fontWeight: FontWeight.w700),
36
+ children: [
37
+ TextSpan(text: '${S.of(context).wallet_group_description_one} '),
38
+ TextSpan(
39
+ text: '${S.of(context).wallet_group.toLowerCase()} ',
40
+ style: TextStyle(fontWeight: FontWeight.w700),
41
+ ),
42
+ TextSpan(
43
+ text: '${S.of(context).wallet_group_description_two} ',
44
+ ),
45
+ TextSpan(
46
+ text: '${S.of(context).choose_wallet_group} ',
47
+ style: TextStyle(fontWeight: FontWeight.w700),
48
+ ),
49
+ TextSpan(
50
+ text: '${S.of(context).wallet_group_description_three} ',
51
+ ),
52
+ TextSpan(
53
+ text: '${S.of(context).create_new_seed} ',
54
+ style: TextStyle(fontWeight: FontWeight.w700),
55
+ ),
56
+ TextSpan(text: S.of(context).wallet_group_description_four),
57
+ ],
58
),
40
- TextSpan(
41
- text: '${S.of(context).wallet_group_description_two} ',
42
- ),
43
- TextSpan(
44
- text: '${S.of(context).choose_wallet_group} ',
45
- style: TextStyle(fontWeight: FontWeight.w700),
46
- ),
47
- TextSpan(
48
- text: '${S.of(context).wallet_group_description_three} ',
49
- ),
50
- TextSpan(
51
- text: '${S.of(context).create_new_seed} ',
52
- style: TextStyle(fontWeight: FontWeight.w700),
59
+ textAlign: TextAlign.center,
60
+ style: TextStyle(
61
+ height: 1.5,
62
+ fontSize: 16,
63
+ fontWeight: FontWeight.w400,
64
+ color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
65
),
54
- TextSpan(text: S.of(context).wallet_group_description_four),
55
- ],
56
- ),
57
- textAlign: TextAlign.center,
58
- style: TextStyle(
59
- height: 1.5,
60
- fontSize: 16,
61
- fontWeight: FontWeight.w400,
62
- color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
66
+ ),
67
),
68
),
69
),
lib/src/screens/new_wallet/wallet_group_existing_seed_description_page.dart
+22
-20
@@ -32,28 +32,30 @@ class WalletGroupExistingSeedDescriptionPage extends BasePage {
32
Image.asset(currentTheme.type.walletGroupImage, height: 200),
33
SizedBox(height: 32),
34
Expanded(
35
- child: RichText(
36
- text: TextSpan(
37
- children: [
38
- TextSpan(
39
- text: S.current.wallet_group_description_existing_seed + '\n\n',
40
- style: textStyle),
41
- TextSpan(
42
- text: S.current.wallet_group_description_open_wallet + '\n\n',
43
- style: textStyle),
44
- TextSpan(
45
- text: S.current.wallet_group_description_view_seed + '\n', style: textStyle),
46
- TextSpan(
47
- text: S.current.seed_display_path,
48
- style: TextStyle(
49
- fontSize: 16,
50
- fontWeight: FontWeight.w800,
51
- color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
35
+ child: SingleChildScrollView(
36
+ child: RichText(
37
+ text: TextSpan(
38
+ children: [
39
+ TextSpan(
40
+ text: S.current.wallet_group_description_existing_seed + '\n\n',
41
+ style: textStyle),
42
+ TextSpan(
43
+ text: S.current.wallet_group_description_open_wallet + '\n\n',
44
+ style: textStyle),
45
+ TextSpan(
46
+ text: S.current.wallet_group_description_view_seed + '\n', style: textStyle),
47
+ TextSpan(
48
+ text: S.current.seed_display_path,
49
+ style: TextStyle(
50
+ fontSize: 16,
51
+ fontWeight: FontWeight.w800,
52
+ color: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
53
+ ),
54
),
53
- ),
54
- ],
55
+ ],
56
+ ),
57
+ textAlign: TextAlign.center,
58
),
56
- textAlign: TextAlign.center,
59
),
60
),
61
Column(
lib/src/screens/send/send_page.dart
+4
-1
@@ -397,7 +397,10 @@ class SendPage extends BasePage {
397
return LoadingPrimaryButton(
398
key: ValueKey('send_page_send_button_key'),
399
onPressed: () async {
400
- FocusManager.instance.primaryFocus?.unfocus();
400
+
401
+ //Request dummy node to get the focus out of the text fields
402
+ FocusScope.of(context).requestFocus(FocusNode());
403
+
404
if (sendViewModel.state is IsExecutingState) return;
405
if (_formKey.currentState != null &&
406
!_formKey.currentState!.validate()) {
lib/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart
+2
-1
@@ -1,3 +1,4 @@
1
+import 'package:auto_size_text/auto_size_text.dart';
2
import 'package:cake_wallet/src/widgets/primary_button.dart';
3
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
4
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
@@ -85,7 +86,7 @@ class InfoBottomSheet extends BaseBottomSheet {
86
const Spacer(flex: 2),
87
Expanded(
88
flex: 6,
88
- child: Text(
89
+ child: AutoSizeText(
90
content!,
91
textAlign: TextAlign.center,
92
style: TextStyle(