mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Improved non dynamic theme
This commit is contained in:
parent
386af8e809
commit
1f0f158251
40 changed files with 118 additions and 277 deletions
|
@ -139,7 +139,7 @@ class _AddClientModalState extends State<AddClientModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
)
|
||||
|
|
|
@ -49,7 +49,7 @@ class AdvancedSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.overrideSslCheck,
|
||||
onChanged: updateSslCheck,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateSslCheck(!appConfigProvider.overrideSslCheck),
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
|
@ -89,11 +89,11 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
bottomLeft: Radius.circular(15)
|
||||
),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
color: valueToShow == 'message'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Message",
|
||||
|
@ -117,15 +117,15 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
),
|
||||
color: valueToShow == 'statusCode'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Status code",
|
||||
|
@ -160,11 +160,11 @@ class _AppLogDetailsModalState extends State<AppLogDetailsModal> {
|
|||
bottomRight: Radius.circular(15)
|
||||
),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).primaryColor
|
||||
color: Theme.of(context).colorScheme.primary
|
||||
),
|
||||
color: valueToShow == 'body'
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).primaryColor.withOpacity(0.05)
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.primary.withOpacity(0.05)
|
||||
),
|
||||
child: Text(
|
||||
"Body",
|
||||
|
|
|
@ -41,10 +41,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
backgroundColor: MaterialStateProperty.all(
|
||||
value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyBackgroundColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
? Theme.of(context).colorScheme.surfaceVariant
|
||||
: greyBackgroundColor,
|
||||
)
|
||||
),
|
||||
|
@ -60,10 +60,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
icon,
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyIconColor,
|
||||
size: 30,
|
||||
),
|
||||
|
@ -72,10 +72,10 @@ class ThemeModeButton extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
? Theme.of(context).colorScheme.primary.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: greyIconColor,
|
||||
fontSize: 18
|
||||
),
|
||||
|
|
|
@ -193,7 +193,7 @@ class _AddStaticLeaseModalState extends State<AddStaticLeaseModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
),
|
||||
|
|
|
@ -408,7 +408,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
right: 16
|
||||
),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: selectedInterface != null
|
||||
|
@ -449,7 +449,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
onChanged: selectedInterface != null
|
||||
? (value) => setState(() => enabled = value)
|
||||
: null,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -116,7 +116,7 @@ class _CommentModalState extends State<CommentModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.grey
|
||||
),
|
||||
)
|
||||
|
|
|
@ -148,7 +148,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
|
|||
AppLocalizations.of(context)!.confirm,
|
||||
style: TextStyle(
|
||||
color: validData == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||
),
|
||||
),
|
||||
|
|
|
@ -67,7 +67,7 @@ Widget generateStatus(BuildContext context, AppConfigProvider appConfigProvider,
|
|||
return Icon(
|
||||
Icons.check_circle_rounded,
|
||||
color: appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class EncryptionMasterSwitch extends StatelessWidget {
|
|||
right: 16
|
||||
),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
child: InkWell(
|
||||
onTap: () => onChange(!value),
|
||||
|
@ -58,7 +58,7 @@ class EncryptionMasterSwitch extends StatelessWidget {
|
|||
Switch(
|
||||
value: value,
|
||||
onChanged: (value) => onChange(value),
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -29,7 +29,7 @@ class Status extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(10),
|
||||
color: valid == true
|
||||
? appConfigProvider.useThemeColorForStatus == true
|
||||
? Theme.of(context).primaryColor
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Colors.green
|
||||
: appConfigProvider.useThemeColorForStatus == true
|
||||
? Colors.grey
|
||||
|
|
|
@ -68,7 +68,7 @@ class GeneralSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.hideZeroValues,
|
||||
onChanged: updateHideZeroValues,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateHideZeroValues(!appConfigProvider.hideZeroValues),
|
||||
padding: const EdgeInsets.only(
|
||||
|
@ -85,7 +85,7 @@ class GeneralSettings extends StatelessWidget {
|
|||
trailing: Switch(
|
||||
value: appConfigProvider.showNameTimeLogs,
|
||||
onChanged: updateShowNameTimeLogs,
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onTap: () => updateShowNameTimeLogs(!appConfigProvider.showNameTimeLogs),
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue