Merge pull request #740 from cypherstack/ui

Make settings menu, advanced settings view, and DebugInfoDialog scrollable (if needed) and capitalize certain Firo terms
This commit is contained in:
Diego Salazar 2024-02-06 20:50:50 -07:00 committed by GitHub
commit 951d19a37a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 296 additions and 285 deletions

View file

@ -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

View file

@ -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: () {

View file

@ -105,8 +105,13 @@ class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
children: [
const Padding(
padding: EdgeInsets.all(15.0),
child: Align(
alignment: Alignment.topLeft,
child: SingleChildScrollView(
child: SettingsMenu(),
),
),
),
Expanded(
child: contentViews[
ref.watch(selectedSettingsMenuItemStateProvider.state).state],

View file

@ -36,7 +36,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Column(
return SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
@ -103,8 +104,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
width: 40,
child: DraggableSwitchButton(
isOn: ref.watch(
prefsChangeNotifierProvider
.select((value) => value.showTestNetCoins),
prefsChangeNotifierProvider.select(
(value) => value.showTestNetCoins),
),
onValueChanged: (newValue) {
ref
@ -141,8 +142,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
width: 40,
child: DraggableSwitchButton(
isOn: ref.watch(
prefsChangeNotifierProvider
.select((value) => value.enableCoinControl),
prefsChangeNotifierProvider.select(
(value) => value.enableCoinControl),
),
onValueChanged: (newValue) {
ref
@ -177,8 +178,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
children: [
Text(
"Stack Experience",
style:
STextStyles.desktopTextExtraSmall(context)
style: STextStyles.desktopTextExtraSmall(
context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
@ -187,7 +188,8 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
),
Text(
externalCalls ? "Easy crypto" : "Incognito",
style: STextStyles.desktopTextExtraExtraSmall(
style:
STextStyles.desktopTextExtraExtraSmall(
context),
),
],
@ -335,6 +337,7 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
),
),
],
),
);
}
}

View file

@ -98,7 +98,10 @@ class _DebugInfoDialog extends ConsumerState<DebugInfoDialog> {
@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: [