Merge remote-tracking branch 'cypherstack/ui-fixes' into simplex

This commit is contained in:
sneurlax 2023-01-24 12:44:50 -06:00
commit 1ebc8868f0
8 changed files with 93 additions and 11 deletions

View file

@ -304,11 +304,16 @@ class _HomeViewState extends ConsumerState<HomeView> {
color: Theme.of(context)
.extension<StackColors>()!
.backgroundAppBar,
boxShadow: [
Theme.of(context)
.extension<StackColors>()!
.standardBoxShadow,
],
boxShadow: Theme.of(context)
.extension<StackColors>()!
.homeViewButtonBarBoxShadow !=
null
? [
Theme.of(context)
.extension<StackColors>()!
.homeViewButtonBarBoxShadow!,
]
: null,
),
child: const Padding(
padding: EdgeInsets.only(

View file

@ -217,6 +217,9 @@ abstract class StackColorTheme {
Color get myStackContactIconBG;
Color get textConfirmTotalAmount;
Color get textSelectedWordTableItem;
BoxShadow get standardBoxShadow;
BoxShadow? get homeViewButtonBarBoxShadow;
}
class CoinThemeColor {

View file

@ -314,4 +314,18 @@ class DarkColors extends StackColorTheme {
Color get textConfirmTotalAmount => const Color(0xFF003921);
@override
Color get textSelectedWordTableItem => const Color(0xFF00297A);
@override
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
@override
BoxShadow? get homeViewButtonBarBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
}

View file

@ -314,4 +314,14 @@ class FruitSorbetColors extends StackColorTheme {
Color get textConfirmTotalAmount => const Color(0xFF232323);
@override
Color get textSelectedWordTableItem => const Color(0xFF232323);
@override
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
@override
BoxShadow? get homeViewButtonBarBoxShadow => null;
}

View file

@ -314,4 +314,18 @@ class LightColors extends StackColorTheme {
Color get textConfirmTotalAmount => const Color(0xFF232323);
@override
Color get textSelectedWordTableItem => const Color(0xFF232323);
@override
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
@override
BoxShadow? get homeViewButtonBarBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
}

View file

@ -321,4 +321,18 @@ class OceanBreezeColors extends StackColorTheme {
Color get textConfirmTotalAmount => const Color(0xFF232323);
@override
Color get textSelectedWordTableItem => const Color(0xFF232323);
@override
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
@override
BoxShadow? get homeViewButtonBarBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
}

View file

@ -316,4 +316,18 @@ class OledBlackColors extends StackColorTheme {
Color get textConfirmTotalAmount => const Color(0xFF144D35);
@override
Color get textSelectedWordTableItem => const Color(0xFF143D8E);
@override
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
@override
BoxShadow? get homeViewButtonBarBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
}

View file

@ -176,6 +176,9 @@ class StackColors extends ThemeExtension<StackColors> {
final Color textConfirmTotalAmount;
final Color textSelectedWordTableItem;
final BoxShadow standardBoxShadow;
final BoxShadow? homeViewButtonBarBoxShadow;
StackColors({
required this.themeType,
required this.background,
@ -312,6 +315,8 @@ class StackColors extends ThemeExtension<StackColors> {
required this.myStackContactIconBG,
required this.textConfirmTotalAmount,
required this.textSelectedWordTableItem,
required this.standardBoxShadow,
required this.homeViewButtonBarBoxShadow,
});
factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) {
@ -453,6 +458,8 @@ class StackColors extends ThemeExtension<StackColors> {
myStackContactIconBG: colorTheme.myStackContactIconBG,
textConfirmTotalAmount: colorTheme.textConfirmTotalAmount,
textSelectedWordTableItem: colorTheme.textSelectedWordTableItem,
homeViewButtonBarBoxShadow: colorTheme.homeViewButtonBarBoxShadow,
standardBoxShadow: colorTheme.standardBoxShadow,
);
}
@ -593,6 +600,8 @@ class StackColors extends ThemeExtension<StackColors> {
Color? myStackContactIconBG,
Color? textConfirmTotalAmount,
Color? textSelectedWordTableItem,
BoxShadow? homeViewButtonBarBoxShadow,
BoxShadow? standardBoxShadow,
}) {
return StackColors(
themeType: themeType ?? this.themeType,
@ -768,6 +777,9 @@ class StackColors extends ThemeExtension<StackColors> {
textConfirmTotalAmount ?? this.textConfirmTotalAmount,
textSelectedWordTableItem:
textSelectedWordTableItem ?? this.textSelectedWordTableItem,
homeViewButtonBarBoxShadow:
homeViewButtonBarBoxShadow ?? this.homeViewButtonBarBoxShadow,
standardBoxShadow: standardBoxShadow ?? this.standardBoxShadow,
);
}
@ -783,6 +795,8 @@ class StackColors extends ThemeExtension<StackColors> {
return StackColors(
themeType: other.themeType,
gradientBackground: other.gradientBackground,
homeViewButtonBarBoxShadow: other.homeViewButtonBarBoxShadow,
standardBoxShadow: other.standardBoxShadow,
background: Color.lerp(
background,
other.background,
@ -1481,12 +1495,6 @@ class StackColors extends ThemeExtension<StackColors> {
static const _coin = CoinThemeColor();
BoxShadow get standardBoxShadow => BoxShadow(
color: shadow,
spreadRadius: 3,
blurRadius: 4,
);
Color colorForStatus(String status) {
switch (status) {
case "New":