mod: disable palette when using dyn theme

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-13 12:48:57 +08:00
parent 5707c08011
commit ef7b8c4c7f

View File

@@ -81,55 +81,69 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
subtitle: Obx(() => Text('当前模式:${ctr.themeType.value.description}', subtitle: Obx(() => Text('当前模式:${ctr.themeType.value.description}',
style: subTitleStyle)), style: subTitleStyle)),
), ),
ListTile( Obx(
title: Row( () => ListTile(
mainAxisAlignment: MainAxisAlignment.spaceBetween, enabled: ctr.type.value != 0,
children: [ title: Row(
const Text('调色板风格'), mainAxisAlignment: MainAxisAlignment.spaceBetween,
PopupMenuButton( children: [
initialValue: _dynamicSchemeVariant, const Text('调色板风格'),
onSelected: (item) async { PopupMenuButton(
_dynamicSchemeVariant = item; enabled: ctr.type.value != 0,
await GStorage.setting initialValue: _dynamicSchemeVariant,
.put(SettingBoxKey.schemeVariant, item.index); onSelected: (item) async {
Get.forceAppUpdate(); _dynamicSchemeVariant = item;
}, await GStorage.setting
itemBuilder: (context) => FlexSchemeVariant.values .put(SettingBoxKey.schemeVariant, item.index);
.map((item) => PopupMenuItem<FlexSchemeVariant>( Get.forceAppUpdate();
value: item, },
child: Text(item.variantName), itemBuilder: (context) => FlexSchemeVariant.values
)) .map((item) => PopupMenuItem<FlexSchemeVariant>(
.toList(), value: item,
child: Row( child: Text(item.variantName),
mainAxisSize: MainAxisSize.min, ))
children: [ .toList(),
Text( child: Row(
_dynamicSchemeVariant.variantName, mainAxisSize: MainAxisSize.min,
style: TextStyle( children: [
height: 1, Text(
fontSize: 13, _dynamicSchemeVariant.variantName,
color: Theme.of(context).colorScheme.primary, style: TextStyle(
height: 1,
fontSize: 13,
color: ctr.type.value == 0
? Theme.of(context)
.colorScheme
.outline
.withOpacity(0.8)
: Theme.of(context).colorScheme.secondary,
),
strutStyle: StrutStyle(leading: 0, height: 1),
), ),
strutStyle: StrutStyle(leading: 0, height: 1), Icon(
), size: 20,
Icon( Icons.keyboard_arrow_right,
size: 20, color: ctr.type.value == 0
Icons.keyboard_arrow_right, ? Theme.of(context)
color: Theme.of(context).colorScheme.primary, .colorScheme
) .outline
], .withOpacity(0.8)
: Theme.of(context).colorScheme.secondary,
)
],
),
), ),
), ],
], ),
), leading: Container(
leading: Container( width: 40,
width: 40, alignment: Alignment.center,
alignment: Alignment.center, child: Icon(Icons.palette_outlined),
child: Icon(Icons.palette_outlined), ),
), subtitle: Text(
subtitle: Text( _dynamicSchemeVariant.description,
_dynamicSchemeVariant.description, style: TextStyle(fontSize: 12),
style: TextStyle(fontSize: 12), ),
), ),
), ),
Obx( Obx(