From 9e3cc4544d90d881fb163c643af0c077ae593840 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 31 Jan 2024 15:35:20 -0600 Subject: [PATCH 1/5] lelantus->Lelantus, spark->Spark, firo->Firo --- lib/pages/special/firo_rescan_recovery_error_dialog.dart | 2 +- .../sub_widgets/wallet_balance_toggle_sheet.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/special/firo_rescan_recovery_error_dialog.dart b/lib/pages/special/firo_rescan_recovery_error_dialog.dart index d062b62d5..a812c377d 100644 --- a/lib/pages/special/firo_rescan_recovery_error_dialog.dart +++ b/lib/pages/special/firo_rescan_recovery_error_dialog.dart @@ -209,7 +209,7 @@ class _FiroRescanRecoveryErrorViewState children: [ if (!Util.isDesktop) const Spacer(), Text( - "Failed to rescan firo wallet", + "Failed to rescan Firo wallet", style: STextStyles.pageTitleH2(context), ), Util.isDesktop diff --git a/lib/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart b/lib/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart index 8fa7eaaef..45483e9d0 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart @@ -178,7 +178,7 @@ class WalletBalanceToggleSheet extends ConsumerWidget { ), if (balanceSecondary != null) BalanceSelector( - title: "Available lelantus balance", + title: "Available Lelantus balance", coin: coin, balance: balanceSecondary.spendable, onPressed: () { @@ -204,7 +204,7 @@ class WalletBalanceToggleSheet extends ConsumerWidget { ), if (balanceSecondary != null) BalanceSelector( - title: "Full lelantus balance", + title: "Full Lelantus balance", coin: coin, balance: balanceSecondary.total, onPressed: () { @@ -230,7 +230,7 @@ class WalletBalanceToggleSheet extends ConsumerWidget { ), if (balanceTertiary != null) BalanceSelector( - title: "Available spark balance", + title: "Available Spark balance", coin: coin, balance: balanceTertiary.spendable, onPressed: () { @@ -256,7 +256,7 @@ class WalletBalanceToggleSheet extends ConsumerWidget { ), if (balanceTertiary != null) BalanceSelector( - title: "Full spark balance", + title: "Full Spark balance", coin: coin, balance: balanceTertiary.total, onPressed: () { From 2d22b9a4acc6813b3e1872dc8a60d7856dc938c6 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 31 Jan 2024 16:00:22 -0600 Subject: [PATCH 2/5] make entire DebugInfoDialog scrollable --- .../settings_menu/advanced_settings/advanced_settings.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart index 1a11320c0..3647cf805 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart @@ -319,7 +319,9 @@ class _AdvancedSettings extends ConsumerState { useSafeArea: false, barrierDismissible: true, builder: (context) { - return const DebugInfoDialog(); + return const SingleChildScrollView( + child: DebugInfoDialog(), + ); }, ); }, From 1f3ce757bdd68c790a141e38d293ac3e61b2c6f8 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 31 Jan 2024 16:18:52 -0600 Subject: [PATCH 3/5] make settings menu scrollable on small screens --- .../settings/desktop_settings_view.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/settings/desktop_settings_view.dart b/lib/pages_desktop_specific/settings/desktop_settings_view.dart index 6a785fc8a..5d95cd960 100644 --- a/lib/pages_desktop_specific/settings/desktop_settings_view.dart +++ b/lib/pages_desktop_specific/settings/desktop_settings_view.dart @@ -105,7 +105,12 @@ class _DesktopSettingsViewState extends ConsumerState { children: [ const Padding( padding: EdgeInsets.all(15.0), - child: SettingsMenu(), + child: Align( + alignment: Alignment.topLeft, + child: SingleChildScrollView( + child: SettingsMenu(), + ), + ), ), Expanded( child: contentViews[ From 033850c6773b6a1f5b6dc12a22cd51633b1859b5 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 31 Jan 2024 16:33:24 -0600 Subject: [PATCH 4/5] make advanced settings view scrollable TODO make other views scrollable, too --- .../advanced_settings/advanced_settings.dart | 563 +++++++++--------- 1 file changed, 283 insertions(+), 280 deletions(-) diff --git a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart index 3647cf805..435d162ac 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart @@ -36,307 +36,310 @@ class _AdvancedSettings extends ConsumerState { @override Widget build(BuildContext context) { debugPrint("BUILD: $runtimeType"); - return Column( - children: [ - Padding( - padding: const EdgeInsets.only( - right: 30, - ), - child: RoundedWhiteContainer( - radiusMultiplier: 2, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: SvgPicture.asset( - Assets.svg.circleSliders, - width: 48, - height: 48, + return SingleChildScrollView( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only( + right: 30, + ), + child: RoundedWhiteContainer( + radiusMultiplier: 2, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset( + Assets.svg.circleSliders, + width: 48, + height: 48, + ), ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Padding( - padding: const EdgeInsets.all(10), - child: RichText( - textAlign: TextAlign.start, - text: TextSpan( - children: [ - TextSpan( - text: "Advanced", - style: STextStyles.desktopTextSmall(context), - ), - TextSpan( - text: - "\n\nConfigure these settings only if you know what you are doing!", - style: STextStyles.desktopTextExtraExtraSmall( - context), - ), - ], + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Padding( + padding: const EdgeInsets.all(10), + child: RichText( + textAlign: TextAlign.start, + text: TextSpan( + children: [ + TextSpan( + text: "Advanced", + style: STextStyles.desktopTextSmall(context), + ), + TextSpan( + text: + "\n\nConfigure these settings only if you know what you are doing!", + style: STextStyles.desktopTextExtraExtraSmall( + context), + ), + ], + ), ), ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Toggle testnet coins", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - SizedBox( - height: 20, - width: 40, - child: DraggableSwitchButton( - isOn: ref.watch( - prefsChangeNotifierProvider - .select((value) => value.showTestNetCoins), - ), - onValueChanged: (newValue) { - ref - .read(prefsChangeNotifierProvider) - .showTestNetCoins = newValue; - }, - ), - ), - ], - ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, - ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Enable coin control", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - SizedBox( - height: 20, - width: 40, - child: DraggableSwitchButton( - isOn: ref.watch( - prefsChangeNotifierProvider - .select((value) => value.enableCoinControl), - ), - onValueChanged: (newValue) { - ref - .read(prefsChangeNotifierProvider) - .enableCoinControl = newValue; - }, - ), - ), - ], - ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, - ), - ), - - /// TODO: Make a dialog popup - Consumer(builder: (_, ref, __) { - final externalCalls = ref.watch( - prefsChangeNotifierProvider - .select((value) => value.externalCalls), - ); - return Padding( + Padding( padding: const EdgeInsets.all(10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Stack Experience", - style: - STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - Text( - externalCalls ? "Easy crypto" : "Incognito", - style: STextStyles.desktopTextExtraExtraSmall( - context), - ), - ], + Text( + "Toggle testnet coins", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + SizedBox( + height: 20, + width: 40, + child: DraggableSwitchButton( + isOn: ref.watch( + prefsChangeNotifierProvider.select( + (value) => value.showTestNetCoins), + ), + onValueChanged: (newValue) { + ref + .read(prefsChangeNotifierProvider) + .showTestNetCoins = newValue; + }, + ), ), - PrimaryButton( - label: "Change", - buttonHeight: ButtonHeight.xs, - width: 101, - onPressed: () async { - await showDialog( - context: context, - useSafeArea: false, - barrierDismissible: true, - builder: (context) { - return const StackPrivacyDialog(); - }, - ); - }, - ) ], ), - ); - }), - ], - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, - ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Block explorers", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, ), - PrimaryButton( - buttonHeight: ButtonHeight.xs, - label: "Edit", - width: 101, - onPressed: () async { - await showDialog( - context: context, - useSafeArea: false, - barrierDismissible: true, - builder: (context) { - return const DesktopManageBlockExplorersDialog(); - }, - ); - }, + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), ), + Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Enable coin control", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + SizedBox( + height: 20, + width: 40, + child: DraggableSwitchButton( + isOn: ref.watch( + prefsChangeNotifierProvider.select( + (value) => value.enableCoinControl), + ), + onValueChanged: (newValue) { + ref + .read(prefsChangeNotifierProvider) + .enableCoinControl = newValue; + }, + ), + ), + ], + ), + ), + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), + ), + + /// TODO: Make a dialog popup + Consumer(builder: (_, ref, __) { + final externalCalls = ref.watch( + prefsChangeNotifierProvider + .select((value) => value.externalCalls), + ); + return Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Stack Experience", + style: STextStyles.desktopTextExtraSmall( + context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + Text( + externalCalls ? "Easy crypto" : "Incognito", + style: + STextStyles.desktopTextExtraExtraSmall( + context), + ), + ], + ), + PrimaryButton( + label: "Change", + buttonHeight: ButtonHeight.xs, + width: 101, + onPressed: () async { + await showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return const StackPrivacyDialog(); + }, + ); + }, + ) + ], + ), + ); + }), ], ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Units", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - PrimaryButton( - buttonHeight: ButtonHeight.xs, - label: "Edit", - width: 101, - onPressed: () async { - await showDialog( - context: context, - useSafeArea: false, - barrierDismissible: true, - builder: (context) { - return const ManageCoinUnitsView(); - }, - ); - }, - ), - ], + Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Block explorers", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + PrimaryButton( + buttonHeight: ButtonHeight.xs, + label: "Edit", + width: 101, + onPressed: () async { + await showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return const DesktopManageBlockExplorersDialog(); + }, + ); + }, + ), + ], + ), ), - ), - const Padding( - padding: EdgeInsets.all(10.0), - child: Divider( - thickness: 0.5, + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Debug info", - style: STextStyles.desktopTextExtraSmall(context) - .copyWith( - color: Theme.of(context) - .extension()! - .textDark), - textAlign: TextAlign.left, - ), - PrimaryButton( - buttonHeight: ButtonHeight.xs, - label: "Show logs", - width: 101, - onPressed: () async { - await showDialog( - context: context, - useSafeArea: false, - barrierDismissible: true, - builder: (context) { - return const SingleChildScrollView( - child: DebugInfoDialog(), - ); - }, - ); - }, - ), - ], + Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Units", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + PrimaryButton( + buttonHeight: ButtonHeight.xs, + label: "Edit", + width: 101, + onPressed: () async { + await showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return const ManageCoinUnitsView(); + }, + ); + }, + ), + ], + ), ), - ), - const SizedBox( - height: 10, - ), - ], + const Padding( + padding: EdgeInsets.all(10.0), + child: Divider( + thickness: 0.5, + ), + ), + Padding( + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Debug info", + style: STextStyles.desktopTextExtraSmall(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textDark), + textAlign: TextAlign.left, + ), + PrimaryButton( + buttonHeight: ButtonHeight.xs, + label: "Show logs", + width: 101, + onPressed: () async { + await showDialog( + context: context, + useSafeArea: false, + barrierDismissible: true, + builder: (context) { + return const SingleChildScrollView( + child: DebugInfoDialog(), + ); + }, + ); + }, + ), + ], + ), + ), + const SizedBox( + height: 10, + ), + ], + ), ), ), - ), - ], + ], + ), ); } } From 8c7f9b491d30d871dd783d80186edd97b7754602 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 6 Feb 2024 21:08:36 -0600 Subject: [PATCH 5/5] don't scroll in scroll, size debug log dialog down on small screens --- .../settings_menu/advanced_settings/advanced_settings.dart | 4 +--- .../settings_menu/advanced_settings/debug_info_dialog.dart | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart index 435d162ac..102a547d6 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/advanced_settings.dart @@ -321,9 +321,7 @@ class _AdvancedSettings extends ConsumerState { useSafeArea: false, barrierDismissible: true, builder: (context) { - return const SingleChildScrollView( - child: DebugInfoDialog(), - ); + return const DebugInfoDialog(); }, ); }, diff --git a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/debug_info_dialog.dart b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/debug_info_dialog.dart index 0ae221621..c9a476d04 100644 --- a/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/debug_info_dialog.dart +++ b/lib/pages_desktop_specific/settings/settings_menu/advanced_settings/debug_info_dialog.dart @@ -98,7 +98,10 @@ class _DebugInfoDialog extends ConsumerState { @override Widget build(BuildContext context) { return DesktopDialog( - maxHeight: 850, + // Max height of 850 unless the screen is smaller than that. + maxHeight: MediaQuery.of(context).size.height < 850 + ? MediaQuery.of(context).size.height + : 850, maxWidth: 600, child: Column( children: [