mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-21 17:24:18 +00:00
Added use theme color for status
This commit is contained in:
parent
3875f161ca
commit
6b593dc195
7 changed files with 80 additions and 14 deletions
|
@ -41,12 +41,14 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
int selectedTheme = 0;
|
||||
bool dynamicColor = true;
|
||||
int selectedColor = 0;
|
||||
bool useThemeColorInsteadGreenRed = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
selectedTheme = widget.appConfigProvider.selectedTheme == ThemeMode.light ? 1 : 2;
|
||||
dynamicColor = widget.appConfigProvider.useDynamicColor;
|
||||
selectedColor = widget.appConfigProvider.staticColor;
|
||||
useThemeColorInsteadGreenRed = widget.appConfigProvider.useThemeColorForStatus;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
@ -167,14 +169,23 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
top: 10
|
||||
),
|
||||
child: Text(
|
||||
colorTranslation(context, selectedColor!),
|
||||
colorTranslation(context, selectedColor),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
fontSize: 16
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
CustomSwitchListTile(
|
||||
value: useThemeColorInsteadGreenRed,
|
||||
onChanged: (value) {
|
||||
setState(() => useThemeColorInsteadGreenRed = value);
|
||||
appConfigProvider.setUseThemeColorForStatus(value);
|
||||
},
|
||||
title: AppLocalizations.of(context)!.useThemeColorStatus,
|
||||
subtitle: AppLocalizations.of(context)!.useThemeColorStatusDescription,
|
||||
)
|
||||
]
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue