Cw 470 additional theming fixes (#1052)

* fix: revert theme order (bright-purple as default)

* fix: missing card borders

* fix: high contrast gradients (send/exchange)

* fix: contact list page

* feat: add picker search border and change high contrast search fill

* fix: balance page txts

* fix: accounts_subaddresses button

* fix: exchange page buttons

* Revert "fix: revert theme order (bright-purple as default)"

This reverts commit 8e13b2241c.

* fix: themetype enum

* feat: add localized strings to backup dialog

* fix: onramper flow
This commit is contained in:
Rafael Saes 2023-08-22 15:49:37 -03:00 committed by GitHub
parent 5556d9ef96
commit ee586ab514
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 288 additions and 265 deletions

View file

@ -6,13 +6,15 @@ class PickerTheme extends ThemeExtension<PickerTheme> {
final Color searchBackgroundFillColor;
final Color searchTextColor;
final Color? searchHintColor;
final Color? searchBorderColor;
PickerTheme(
{required this.dividerColor,
this.searchIconColor,
required this.searchBackgroundFillColor,
required this.searchTextColor,
this.searchHintColor});
this.searchHintColor,
this.searchBorderColor});
@override
PickerTheme copyWith(
@ -20,14 +22,15 @@ class PickerTheme extends ThemeExtension<PickerTheme> {
Color? searchIconColor,
Color? searchBackgroundFillColor,
Color? searchTextColor,
Color? searchHintColor}) =>
Color? searchHintColor,
Color? searchBorderColor}) =>
PickerTheme(
dividerColor: dividerColor ?? this.dividerColor,
searchIconColor: searchIconColor ?? this.searchIconColor,
searchBackgroundFillColor:
searchBackgroundFillColor ?? this.searchBackgroundFillColor,
searchBackgroundFillColor: searchBackgroundFillColor ?? this.searchBackgroundFillColor,
searchTextColor: searchTextColor ?? this.searchTextColor,
searchHintColor: searchHintColor ?? this.searchHintColor);
searchHintColor: searchHintColor ?? this.searchHintColor,
searchBorderColor: searchBorderColor ?? this.searchBorderColor);
@override
PickerTheme lerp(ThemeExtension<PickerTheme>? other, double t) {
@ -36,19 +39,14 @@ class PickerTheme extends ThemeExtension<PickerTheme> {
}
return PickerTheme(
dividerColor:
Color.lerp(dividerColor, other.dividerColor, t) ?? dividerColor,
searchIconColor:
Color.lerp(searchIconColor, other.searchIconColor, t) ??
searchIconColor,
searchBackgroundFillColor: Color.lerp(searchBackgroundFillColor,
other.searchBackgroundFillColor, t) ??
searchBackgroundFillColor,
searchTextColor:
Color.lerp(searchTextColor, other.searchTextColor, t) ??
searchTextColor,
searchHintColor:
Color.lerp(searchHintColor, other.searchHintColor, t) ??
searchHintColor);
dividerColor: Color.lerp(dividerColor, other.dividerColor, t) ?? dividerColor,
searchIconColor: Color.lerp(searchIconColor, other.searchIconColor, t) ?? searchIconColor,
searchBackgroundFillColor:
Color.lerp(searchBackgroundFillColor, other.searchBackgroundFillColor, t) ??
searchBackgroundFillColor,
searchTextColor: Color.lerp(searchTextColor, other.searchTextColor, t) ?? searchTextColor,
searchHintColor: Color.lerp(searchHintColor, other.searchHintColor, t) ?? searchHintColor,
searchBorderColor:
Color.lerp(searchBorderColor, other.searchBorderColor, t) ?? searchBorderColor);
}
}

View file

@ -39,14 +39,12 @@ class HighContrastTheme extends MoneroLightTheme {
@override
CakeTextTheme get cakeTextTheme => super.cakeTextTheme.copyWith(
buttonTextColor: Colors.white,
buttonSecondaryTextColor: Colors.white.withOpacity(0.5));
buttonTextColor: Colors.white, buttonSecondaryTextColor: Colors.white.withOpacity(0.5));
@override
SyncIndicatorTheme get syncIndicatorStyle =>
super.syncIndicatorStyle.copyWith(
textColor: colorScheme.background,
syncedBackgroundColor: containerColor);
SyncIndicatorTheme get syncIndicatorStyle => super
.syncIndicatorStyle
.copyWith(textColor: colorScheme.background, syncedBackgroundColor: containerColor);
@override
BalancePageTheme get balancePageTheme => super.balancePageTheme.copyWith(
@ -56,32 +54,28 @@ class HighContrastTheme extends MoneroLightTheme {
balanceAmountColor: Colors.white);
@override
DashboardPageTheme get dashboardPageTheme =>
super.dashboardPageTheme.copyWith(
textColor: Colors.black,
cardTextColor: Colors.white,
mainActionsIconColor: Colors.white,
indicatorDotTheme: IndicatorDotTheme(
indicatorColor: Colors.grey, activeIndicatorColor: Colors.black));
DashboardPageTheme get dashboardPageTheme => super.dashboardPageTheme.copyWith(
textColor: Colors.black,
cardTextColor: Colors.white,
mainActionsIconColor: Colors.white,
indicatorDotTheme:
IndicatorDotTheme(indicatorColor: Colors.grey, activeIndicatorColor: Colors.black));
@override
ExchangePageTheme get exchangePageTheme => super
.exchangePageTheme
.copyWith(firstGradientTopPanelColor: containerColor);
ExchangePageTheme get exchangePageTheme => super.exchangePageTheme.copyWith(
firstGradientTopPanelColor: primaryColor, firstGradientBottomPanelColor: containerColor);
@override
SendPageTheme get sendPageTheme => super.sendPageTheme.copyWith(
templateTitleColor: Colors.white,
templateBackgroundColor: Colors.black,
firstGradientColor: containerColor);
firstGradientColor: primaryColor);
@override
AddressTheme get addressTheme =>
super.addressTheme.copyWith(actionButtonColor: Colors.grey);
AddressTheme get addressTheme => super.addressTheme.copyWith(actionButtonColor: Colors.grey);
@override
FilterTheme get filterTheme =>
super.filterTheme.copyWith(iconColor: Colors.white);
FilterTheme get filterTheme => super.filterTheme.copyWith(iconColor: Colors.white);
@override
CakeMenuTheme get menuTheme => super.menuTheme.copyWith(
@ -91,10 +85,11 @@ class HighContrastTheme extends MoneroLightTheme {
@override
PickerTheme get pickerTheme => super.pickerTheme.copyWith(
searchIconColor: Colors.white,
searchHintColor: Colors.white,
searchTextColor: Colors.white,
searchBackgroundFillColor: Colors.grey);
searchIconColor: primaryColor,
searchHintColor: primaryColor,
searchTextColor: primaryColor,
searchBackgroundFillColor: Colors.white,
searchBorderColor: primaryColor);
@override
AccountListTheme get accountListTheme => super.accountListTheme.copyWith(
@ -106,13 +101,10 @@ class HighContrastTheme extends MoneroLightTheme {
@override
ReceivePageTheme get receivePageTheme => super.receivePageTheme.copyWith(
tilesTextColor: Colors.white,
iconsBackgroundColor: Colors.grey,
iconsColor: Colors.black);
tilesTextColor: Colors.white, iconsBackgroundColor: Colors.grey, iconsColor: Colors.black);
@override
ThemeData get themeData => super.themeData.copyWith(
disabledColor: Colors.grey,
dialogTheme:
super.themeData.dialogTheme.copyWith(backgroundColor: Colors.white));
dialogTheme: super.themeData.dialogTheme.copyWith(backgroundColor: Colors.white));
}

View file

@ -26,7 +26,7 @@ import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
import 'package:flutter/material.dart';
enum ThemeType { bright, light, dark }
enum ThemeType { light, bright, dark }
abstract class ThemeBase {
ThemeBase({required this.raw}) {