mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat(style): use the correct m3 theming (partially) (#680)
This commit is contained in:
parent
5d63d5c2d3
commit
318cd87a9a
@ -23,46 +23,46 @@ class DynamicThemeBuilder extends StatelessWidget {
|
|||||||
builder: (lightColorScheme, darkColorScheme) {
|
builder: (lightColorScheme, darkColorScheme) {
|
||||||
final ThemeData lightDynamicTheme = ThemeData(
|
final ThemeData lightDynamicTheme = ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
canvasColor: lightColorScheme?.background,
|
canvasColor: lightColorScheme?.surface,
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
backgroundColor: lightColorScheme?.background,
|
backgroundColor: lightColorScheme?.surface,
|
||||||
indicatorColor: lightColorScheme?.primary.withAlpha(150),
|
indicatorColor: lightColorScheme?.secondaryContainer,
|
||||||
labelTextStyle: MaterialStateProperty.all(
|
labelTextStyle: MaterialStateProperty.all(
|
||||||
GoogleFonts.roboto(
|
GoogleFonts.roboto(
|
||||||
color: lightColorScheme?.secondary,
|
color: lightColorScheme?.onSurface,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
iconTheme: MaterialStateProperty.all(
|
iconTheme: MaterialStateProperty.all(
|
||||||
IconThemeData(
|
IconThemeData(
|
||||||
color: lightColorScheme?.secondary,
|
color: lightColorScheme?.onSecondaryContainer,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: lightColorScheme?.background,
|
scaffoldBackgroundColor: lightColorScheme?.surface,
|
||||||
colorScheme: lightColorScheme?.harmonized(),
|
colorScheme: lightColorScheme?.harmonized(),
|
||||||
toggleableActiveColor: lightColorScheme?.primary,
|
toggleableActiveColor: lightColorScheme?.primary,
|
||||||
textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme),
|
textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme),
|
||||||
);
|
);
|
||||||
final ThemeData darkDynamicTheme = ThemeData(
|
final ThemeData darkDynamicTheme = ThemeData(
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
canvasColor: darkColorScheme?.background,
|
canvasColor: darkColorScheme?.surface,
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
backgroundColor: darkColorScheme?.background,
|
backgroundColor: darkColorScheme?.surface,
|
||||||
indicatorColor: darkColorScheme?.primary.withOpacity(0.4),
|
indicatorColor: darkColorScheme?.secondaryContainer,
|
||||||
labelTextStyle: MaterialStateProperty.all(
|
labelTextStyle: MaterialStateProperty.all(
|
||||||
GoogleFonts.roboto(
|
GoogleFonts.roboto(
|
||||||
color: darkColorScheme?.secondary,
|
color: darkColorScheme?.onSurface,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
iconTheme: MaterialStateProperty.all(
|
iconTheme: MaterialStateProperty.all(
|
||||||
IconThemeData(
|
IconThemeData(
|
||||||
color: darkColorScheme?.secondary,
|
color: darkColorScheme?.onSecondaryContainer,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: darkColorScheme?.background,
|
scaffoldBackgroundColor: darkColorScheme?.surface,
|
||||||
colorScheme: darkColorScheme?.harmonized(),
|
colorScheme: darkColorScheme?.harmonized(),
|
||||||
toggleableActiveColor: darkColorScheme?.primary,
|
toggleableActiveColor: darkColorScheme?.primary,
|
||||||
textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme),
|
textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme),
|
||||||
|
@ -44,7 +44,7 @@ class CustomSwitch extends StatelessWidget {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: value
|
color: value
|
||||||
? Theme.of(context).colorScheme.primaryContainer
|
? Theme.of(context).colorScheme.primaryContainer
|
||||||
: Colors.white,
|
: Theme.of(context).colorScheme.surface,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black12.withOpacity(0.1),
|
color: Colors.black12.withOpacity(0.1),
|
||||||
|
Loading…
Reference in New Issue
Block a user