Skip to content

Commit 88bdf69

Browse files
committed
theme [nfc]: s/bgMain/mainBackground/, following change in Figma
For how I retrieved the current list of variables, see zulip#762 (comment) .
1 parent 2393a19 commit 88bdf69

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/widgets/theme.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ThemeData zulipThemeData(BuildContext context) {
5959
colorScheme: ColorScheme.fromSeed(
6060
seedColor: kZulipBrandColor,
6161
),
62-
scaffoldBackgroundColor: designVariables.bgMain,
62+
scaffoldBackgroundColor: designVariables.mainBackground,
6363
tooltipTheme: const TooltipThemeData(preferBelow: false),
6464
);
6565
}
@@ -76,18 +76,18 @@ const kZulipBrandColor = Color.fromRGBO(0x64, 0x92, 0xfe, 1);
7676
/// https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=2945-49492&t=MEb4vtp7S26nntxm-0
7777
class DesignVariables extends ThemeExtension<DesignVariables> {
7878
DesignVariables() :
79-
bgMain = const Color(0xfff0f0f0),
8079
bgTopBar = const Color(0xfff5f5f5),
8180
borderBar = const Color(0x33000000),
8281
icon = const Color(0xff666699),
82+
mainBackground = const Color(0xfff0f0f0),
8383
title = const Color(0xff1a1a1a),
8484
streamColorSwatches = StreamColorSwatches.light;
8585

8686
DesignVariables._({
87-
required this.bgMain,
8887
required this.bgTopBar,
8988
required this.borderBar,
9089
required this.icon,
90+
required this.mainBackground,
9191
required this.title,
9292
required this.streamColorSwatches,
9393
});
@@ -102,29 +102,29 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
102102
return extension!;
103103
}
104104

105-
final Color bgMain;
106105
final Color bgTopBar;
107106
final Color borderBar;
108107
final Color icon;
108+
final Color mainBackground;
109109
final Color title;
110110

111111
// Not exactly from the Figma design, but from Vlad anyway.
112112
final StreamColorSwatches streamColorSwatches;
113113

114114
@override
115115
DesignVariables copyWith({
116-
Color? bgMain,
117116
Color? bgTopBar,
118117
Color? borderBar,
119118
Color? icon,
119+
Color? mainBackground,
120120
Color? title,
121121
StreamColorSwatches? streamColorSwatches,
122122
}) {
123123
return DesignVariables._(
124-
bgMain: bgMain ?? this.bgMain,
125124
bgTopBar: bgTopBar ?? this.bgTopBar,
126125
borderBar: borderBar ?? this.borderBar,
127126
icon: icon ?? this.icon,
127+
mainBackground: mainBackground ?? this.mainBackground,
128128
title: title ?? this.title,
129129
streamColorSwatches: streamColorSwatches ?? this.streamColorSwatches,
130130
);
@@ -136,10 +136,10 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
136136
return this;
137137
}
138138
return DesignVariables._(
139-
bgMain: Color.lerp(bgMain, other.bgMain, t)!,
140139
bgTopBar: Color.lerp(bgTopBar, other.bgTopBar, t)!,
141140
borderBar: Color.lerp(borderBar, other.borderBar, t)!,
142141
icon: Color.lerp(icon, other.icon, t)!,
142+
mainBackground: Color.lerp(mainBackground, other.mainBackground, t)!,
143143
title: Color.lerp(title, other.title, t)!,
144144
streamColorSwatches: StreamColorSwatches.lerp(streamColorSwatches, other.streamColorSwatches, t),
145145
);

0 commit comments

Comments
 (0)