oledBlack theme added to desktop

This commit is contained in:
ryleedavis 2023-01-06 09:12:01 -07:00
parent 7aad7cb9e3
commit 23e3452cf1
5 changed files with 102 additions and 93 deletions

View file

@ -59,6 +59,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/dark_colors.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart';
import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/utilities/util.dart';
import 'package:window_size/window_size.dart'; import 'package:window_size/window_size.dart';
@ -75,7 +76,6 @@ void main() async {
if (Platform.isIOS) { if (Platform.isIOS) {
Util.libraryPath = await getLibraryDirectory(); Util.libraryPath = await getLibraryDirectory();
} }
Screen? screen; Screen? screen;
if (Platform.isLinux || (Util.isDesktop && !Platform.isIOS)) { if (Platform.isLinux || (Util.isDesktop && !Platform.isIOS)) {
screen = await getCurrentScreen(); screen = await getCurrentScreen();
@ -323,6 +323,9 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
case "dark": case "dark":
colorTheme = DarkColors(); colorTheme = DarkColors();
break; break;
case "oledBlack":
colorTheme = OledBlackColors();
break;
case "oceanBreeze": case "oceanBreeze":
colorTheme = OceanBreezeColors(); colorTheme = OceanBreezeColors();
break; break;

View file

@ -35,106 +35,110 @@ class _AppearanceOptionSettings
), ),
child: RoundedWhiteContainer( child: RoundedWhiteContainer(
radiusMultiplier: 2, radiusMultiplier: 2,
child: Column( child: Wrap(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset(
Assets.svg.circleSun,
width: 48,
height: 48,
),
),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(8.0),
child: RichText( child: SvgPicture.asset(
textAlign: TextAlign.left, Assets.svg.circleSun,
text: TextSpan( width: 48,
children: [ height: 48,
TextSpan(
text: "Appearances",
style: STextStyles.desktopTextSmall(context),
),
TextSpan(
text:
"\n\nCustomize how your Stack Wallet looks according to your preferences.",
style: STextStyles.desktopTextExtraExtraSmall(
context),
),
],
),
), ),
), ),
], Column(
), crossAxisAlignment: CrossAxisAlignment.stretch,
const Padding( children: [
padding: EdgeInsets.all(10.0), Padding(
child: Divider( padding: const EdgeInsets.all(10),
thickness: 0.5, child: RichText(
), textAlign: TextAlign.left,
), text: TextSpan(
Padding( children: [
padding: const EdgeInsets.all(10.0), TextSpan(
child: Row( text: "Appearances",
mainAxisAlignment: MainAxisAlignment.spaceBetween, style: STextStyles.desktopTextSmall(context),
children: [ ),
Text( TextSpan(
"Display favorite wallets", text:
style: STextStyles.desktopTextExtraSmall(context) "\n\nCustomize how your Stack Wallet looks according to your preferences.",
.copyWith( style: STextStyles.desktopTextExtraExtraSmall(
color: Theme.of(context) context),
.extension<StackColors>()! ),
.textDark), ],
textAlign: TextAlign.left, ),
),
SizedBox(
height: 20,
width: 40,
child: DraggableSwitchButton(
isOn: ref.watch(
prefsChangeNotifierProvider
.select((value) => value.showFavoriteWallets),
), ),
onValueChanged: (newValue) {
ref
.read(prefsChangeNotifierProvider)
.showFavoriteWallets = newValue;
},
), ),
) ],
], ),
), const Padding(
), padding: EdgeInsets.all(10.0),
const Padding( child: Divider(
padding: EdgeInsets.all(10.0), thickness: 0.5,
child: Divider(
thickness: 0.5,
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Choose theme",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
), ),
], ),
), Padding(
), padding: const EdgeInsets.all(10.0),
const Padding( child: Row(
padding: EdgeInsets.all(10), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: ThemeToggle(), children: [
Text(
"Display favorite wallets",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
SizedBox(
height: 20,
width: 40,
child: DraggableSwitchButton(
isOn: ref.watch(
prefsChangeNotifierProvider.select(
(value) => value.showFavoriteWallets),
),
onValueChanged: (newValue) {
ref
.read(prefsChangeNotifierProvider)
.showFavoriteWallets = newValue;
},
),
)
],
),
),
const Padding(
padding: EdgeInsets.all(10.0),
child: Divider(
thickness: 0.5,
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Choose theme",
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark),
textAlign: TextAlign.left,
),
],
),
),
Padding(
padding: EdgeInsets.all(10),
child: ThemeToggle(),
),
],
), ),
], ],
), ),

View file

@ -33,6 +33,7 @@ class _SVG {
switch (Theme.of(context).extension<StackColors>()!.themeType) { switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light: case ThemeType.light:
case ThemeType.dark: case ThemeType.dark:
case ThemeType.oledBlack:
return null; return null;
case ThemeType.oceanBreeze: case ThemeType.oceanBreeze:

View file

@ -3,7 +3,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class OledBlackColors extends StackColorTheme { class OledBlackColors extends StackColorTheme {
@override @override
ThemeType get themeType => ThemeType.dark; ThemeType get themeType => ThemeType.oledBlack;
@override @override
Color get background => const Color(0xFF000000); Color get background => const Color(0xFF000000);

View file

@ -20,6 +20,7 @@ class Background extends StatelessWidget {
switch (Theme.of(context).extension<StackColors>()!.themeType) { switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light: case ThemeType.light:
case ThemeType.dark: case ThemeType.dark:
case ThemeType.oledBlack:
color = Theme.of(context).extension<StackColors>()!.background; color = Theme.of(context).extension<StackColors>()!.background;
break; break;
case ThemeType.oceanBreeze: case ThemeType.oceanBreeze: