mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-21 18:14:31 +00:00
chans theme desktop selector fix and padding fixes
This commit is contained in:
parent
968b93a41c
commit
3963f29318
2 changed files with 93 additions and 180 deletions
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 216 KiB |
|
@ -136,7 +136,7 @@ class _AppearanceOptionSettings
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(2),
|
||||||
child: ThemeToggle(),
|
child: ThemeToggle(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -186,100 +186,95 @@ class _ThemeToggle extends ConsumerState<ThemeToggle> {
|
||||||
runSpacing: 16,
|
runSpacing: 16,
|
||||||
children: [
|
children: [
|
||||||
for (int i = 0; i < ThemeType.values.length; i++)
|
for (int i = 0; i < ThemeType.values.length; i++)
|
||||||
Row(
|
Padding(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.all(8.0),
|
||||||
children: [
|
child: MouseRegion(
|
||||||
if (i > 0)
|
cursor: SystemMouseCursors.click,
|
||||||
const SizedBox(
|
child: GestureDetector(
|
||||||
width: 10,
|
onTap: () {
|
||||||
),
|
if (ref.read(colorThemeProvider.state).state.themeType !=
|
||||||
MouseRegion(
|
ThemeType.values[i]) {
|
||||||
cursor: SystemMouseCursors.click,
|
DB.instance.put<dynamic>(
|
||||||
child: GestureDetector(
|
boxName: DB.boxNameTheme,
|
||||||
onTap: () {
|
key: "colorScheme",
|
||||||
if (ref.read(colorThemeProvider.state).state.themeType !=
|
value: ThemeType.values[i].name,
|
||||||
ThemeType.values[i]) {
|
);
|
||||||
DB.instance.put<dynamic>(
|
ref.read(colorThemeProvider.state).state =
|
||||||
boxName: DB.boxNameTheme,
|
StackColors.fromStackColorTheme(
|
||||||
key: "colorScheme",
|
ThemeType.values[i].colorTheme);
|
||||||
value: ThemeType.values[i].name,
|
}
|
||||||
);
|
},
|
||||||
ref.read(colorThemeProvider.state).state =
|
child: Container(
|
||||||
StackColors.fromStackColorTheme(
|
width: 200,
|
||||||
ThemeType.values[i].colorTheme);
|
color: Colors.transparent,
|
||||||
}
|
child: Column(
|
||||||
},
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: Container(
|
children: [
|
||||||
width: 200,
|
Container(
|
||||||
color: Colors.transparent,
|
decoration: BoxDecoration(
|
||||||
child: Column(
|
border: Border.all(
|
||||||
mainAxisSize: MainAxisSize.min,
|
width: 2.5,
|
||||||
children: [
|
color: ref
|
||||||
Container(
|
.read(colorThemeProvider.state)
|
||||||
decoration: BoxDecoration(
|
.state
|
||||||
border: Border.all(
|
.themeType ==
|
||||||
width: 2.5,
|
ThemeType.values[i]
|
||||||
color: ref
|
? Theme.of(context)
|
||||||
.read(colorThemeProvider.state)
|
.extension<StackColors>()!
|
||||||
.state
|
.infoItemIcons
|
||||||
.themeType ==
|
: Theme.of(context)
|
||||||
ThemeType.values[i]
|
.extension<StackColors>()!
|
||||||
? Theme.of(context)
|
.popupBG,
|
||||||
.extension<StackColors>()!
|
|
||||||
.infoItemIcons
|
|
||||||
: Theme.of(context)
|
|
||||||
.extension<StackColors>()!
|
|
||||||
.popupBG,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(
|
|
||||||
Constants.size.circularBorderRadius,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: SvgPicture.asset(
|
borderRadius: BorderRadius.circular(
|
||||||
assetNameFor(ThemeType.values[i]),
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
child: SvgPicture.asset(
|
||||||
height: 12,
|
assetNameFor(ThemeType.values[i]),
|
||||||
|
height: 160,
|
||||||
),
|
),
|
||||||
Row(
|
),
|
||||||
children: [
|
const SizedBox(
|
||||||
SizedBox(
|
height: 12,
|
||||||
width: 20,
|
),
|
||||||
height: 20,
|
Row(
|
||||||
child: Radio<ThemeType>(
|
children: [
|
||||||
activeColor: Theme.of(context)
|
SizedBox(
|
||||||
.extension<StackColors>()!
|
width: 20,
|
||||||
.radioButtonIconEnabled,
|
height: 20,
|
||||||
value: ThemeType.values[i],
|
child: Radio<ThemeType>(
|
||||||
groupValue: ref
|
activeColor: Theme.of(context)
|
||||||
.read(colorThemeProvider.state)
|
.extension<StackColors>()!
|
||||||
.state
|
.radioButtonIconEnabled,
|
||||||
.themeType,
|
value: ThemeType.values[i],
|
||||||
onChanged: (_) {},
|
groupValue: ref
|
||||||
),
|
.read(colorThemeProvider.state)
|
||||||
|
.state
|
||||||
|
.themeType,
|
||||||
|
onChanged: (_) {},
|
||||||
),
|
),
|
||||||
const SizedBox(
|
),
|
||||||
width: 14,
|
const SizedBox(
|
||||||
|
width: 14,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
ThemeType.values[i].prettyName,
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark,
|
||||||
),
|
),
|
||||||
Text(
|
),
|
||||||
ThemeType.values[i].prettyName,
|
],
|
||||||
style: STextStyles.desktopTextExtraSmall(context)
|
),
|
||||||
.copyWith(
|
],
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<StackColors>()!
|
|
||||||
.textDark,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
),
|
||||||
),
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue