From 14e5614adc1992d702999777ef75cbc63958e2ba Mon Sep 17 00:00:00 2001 From: Kima Date: Thu, 12 Oct 2023 19:51:41 +0200 Subject: [PATCH] done icon color changer in settings --- .../lib/ui/mobile/settings/theme.dart | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/filcnaplo_premium/lib/ui/mobile/settings/theme.dart b/filcnaplo_premium/lib/ui/mobile/settings/theme.dart index 3e3b8b9..87bb694 100644 --- a/filcnaplo_premium/lib/ui/mobile/settings/theme.dart +++ b/filcnaplo_premium/lib/ui/mobile/settings/theme.dart @@ -109,7 +109,7 @@ class _PremiumCustomAccentColorSettingState @override void initState() { super.initState(); - _colorsTabController = TabController(length: 5, vsync: this); + _colorsTabController = TabController(length: 6, vsync: this); _testTabController = TabController(length: 4, vsync: this); settings = Provider.of(context, listen: false); shareProvider = Provider.of(context, listen: false); @@ -769,6 +769,12 @@ class _PremiumCustomAccentColorSettingState CustomColorMode.accent; }); break; + case 5: + setState(() { + colorMode = + CustomColorMode.icon; + }); + break; } }, controller: _colorsTabController, @@ -796,9 +802,15 @@ class _PremiumCustomAccentColorSettingState .accentColor] ?? AppColors.of(context) .text) // idk what else - : settings - .customHighlightColor ?? - unknownColor, + : colorMode == + CustomColorMode + .highlight + ? settings + .customHighlightColor ?? + unknownColor + : settings + .customIconColor ?? + unknownColor, onColorChanged: (c) { setState(() { updateCustomColor(c, false); @@ -821,6 +833,10 @@ class _PremiumCustomAccentColorSettingState AppColors.of(context) .highlight, store: true); + settings.update( + customIconColor: + const Color(0x00000000), + store: true); } else { updateCustomColor(c, true); }