Unverified Commit 2fd0728c authored by Hans Muller's avatar Hans Muller Committed by GitHub

Updated gallery light and dark themes (#28619)

parent 47c835fb
...@@ -25,15 +25,19 @@ TextTheme _buildTextTheme(TextTheme base) { ...@@ -25,15 +25,19 @@ TextTheme _buildTextTheme(TextTheme base) {
ThemeData _buildDarkTheme() { ThemeData _buildDarkTheme() {
const Color primaryColor = Color(0xFF0175c2); const Color primaryColor = Color(0xFF0175c2);
const Color secondaryColor = Color(0xFF13B9FD); const Color secondaryColor = Color(0xFF13B9FD);
final ThemeData base = ThemeData.dark();
final ColorScheme colorScheme = const ColorScheme.dark().copyWith( final ColorScheme colorScheme = const ColorScheme.dark().copyWith(
primary: primaryColor, primary: primaryColor,
secondary: secondaryColor, secondary: secondaryColor,
); );
return base.copyWith( final ThemeData base = ThemeData(
brightness: Brightness.dark,
accentColorBrightness: Brightness.dark,
primaryColor: primaryColor, primaryColor: primaryColor,
primaryColorDark: const Color(0xFF0050a0),
primaryColorLight: secondaryColor,
buttonColor: primaryColor, buttonColor: primaryColor,
indicatorColor: Colors.white, indicatorColor: Colors.white,
toggleableActiveColor: const Color(0xFF6997DF),
accentColor: secondaryColor, accentColor: secondaryColor,
canvasColor: const Color(0xFF202124), canvasColor: const Color(0xFF202124),
scaffoldBackgroundColor: const Color(0xFF202124), scaffoldBackgroundColor: const Color(0xFF202124),
...@@ -43,6 +47,8 @@ ThemeData _buildDarkTheme() { ...@@ -43,6 +47,8 @@ ThemeData _buildDarkTheme() {
colorScheme: colorScheme, colorScheme: colorScheme,
textTheme: ButtonTextTheme.primary, textTheme: ButtonTextTheme.primary,
), ),
);
return base.copyWith(
textTheme: _buildTextTheme(base.textTheme), textTheme: _buildTextTheme(base.textTheme),
primaryTextTheme: _buildTextTheme(base.primaryTextTheme), primaryTextTheme: _buildTextTheme(base.primaryTextTheme),
accentTextTheme: _buildTextTheme(base.accentTextTheme), accentTextTheme: _buildTextTheme(base.accentTextTheme),
...@@ -56,12 +62,14 @@ ThemeData _buildLightTheme() { ...@@ -56,12 +62,14 @@ ThemeData _buildLightTheme() {
primary: primaryColor, primary: primaryColor,
secondary: secondaryColor, secondary: secondaryColor,
); );
final ThemeData base = ThemeData.light(); final ThemeData base = ThemeData(
return base.copyWith( brightness: Brightness.light,
accentColorBrightness: Brightness.dark,
colorScheme: colorScheme, colorScheme: colorScheme,
primaryColor: primaryColor, primaryColor: primaryColor,
buttonColor: primaryColor, buttonColor: primaryColor,
indicatorColor: Colors.white, indicatorColor: Colors.white,
toggleableActiveColor: const Color(0xFF1E88E5),
splashColor: Colors.white24, splashColor: Colors.white24,
splashFactory: InkRipple.splashFactory, splashFactory: InkRipple.splashFactory,
accentColor: secondaryColor, accentColor: secondaryColor,
...@@ -73,6 +81,8 @@ ThemeData _buildLightTheme() { ...@@ -73,6 +81,8 @@ ThemeData _buildLightTheme() {
colorScheme: colorScheme, colorScheme: colorScheme,
textTheme: ButtonTextTheme.primary, textTheme: ButtonTextTheme.primary,
), ),
);
return base.copyWith(
textTheme: _buildTextTheme(base.textTheme), textTheme: _buildTextTheme(base.textTheme),
primaryTextTheme: _buildTextTheme(base.primaryTextTheme), primaryTextTheme: _buildTextTheme(base.primaryTextTheme),
accentTextTheme: _buildTextTheme(base.accentTextTheme), accentTextTheme: _buildTextTheme(base.accentTextTheme),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment