Skip to content

Commit 8f80b77

Browse files
committed
compose: Compose-box border is subtle in dark mode
Updated the top border and added shadow effect to the top of the compose box to ensure it is subtle in dark mode. For reference, see the Figma design: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=5908-64038&t=alSmAmdRXFDwT4IT-1 Fixes: #1207
1 parent 3ff7096 commit 8f80b77

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

lib/widgets/compose_box.dart

+15-1
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,21 @@ class _ComposeBoxContainer extends StatelessWidget {
10511051
// the message list itself
10521052
return Container(width: double.infinity,
10531053
decoration: BoxDecoration(
1054-
border: Border(top: BorderSide(color: designVariables.borderBar))),
1054+
border: Border(
1055+
top: BorderSide(
1056+
color: designVariables.composeBoxBorderBar,
1057+
width: 1.0,
1058+
),
1059+
),
1060+
boxShadow: [
1061+
BoxShadow(
1062+
color: designVariables.composeBoxShadow,
1063+
offset: const Offset(0, -4),
1064+
blurRadius: 16,
1065+
spreadRadius: 0,
1066+
),
1067+
],
1068+
),
10551069
// TODO(#720) try a Stack for the overlaid linear progress indicator
10561070
child: Material(
10571071
color: designVariables.composeBoxBg,

lib/widgets/theme.dart

+14
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
132132
btnLabelAttLowIntDanger: const Color(0xffc0070a),
133133
btnLabelAttMediumIntDanger: const Color(0xffac0508),
134134
composeBoxBg: const Color(0xffffffff),
135+
composeBoxBorderBar: Colors.black.withValues(alpha: 0.2),
136+
composeBoxShadow: const Color(0xff242424),
135137
contextMenuCancelText: const Color(0xff222222),
136138
contextMenuItemBg: const Color(0xff6159e1),
137139
contextMenuItemText: const Color(0xff381da7),
@@ -182,6 +184,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
182184
btnLabelAttLowIntDanger: const Color(0xffff8b7c),
183185
btnLabelAttMediumIntDanger: const Color(0xffff8b7c),
184186
composeBoxBg: const Color(0xff0f0f0f),
187+
composeBoxBorderBar: Colors.white.withValues(alpha: 0.1),
188+
composeBoxShadow: const Color(0xff242424),
185189
contextMenuCancelText: const Color(0xffffffff).withValues(alpha: 0.75),
186190
contextMenuItemBg: const Color(0xff7977fe),
187191
contextMenuItemText: const Color(0xff9398fd),
@@ -239,6 +243,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
239243
required this.btnLabelAttLowIntDanger,
240244
required this.btnLabelAttMediumIntDanger,
241245
required this.composeBoxBg,
246+
required this.composeBoxBorderBar,
247+
required this.composeBoxShadow,
242248
required this.contextMenuCancelText,
243249
required this.contextMenuItemBg,
244250
required this.contextMenuItemText,
@@ -297,6 +303,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
297303
final Color btnLabelAttLowIntDanger;
298304
final Color btnLabelAttMediumIntDanger;
299305
final Color composeBoxBg;
306+
final Color composeBoxBorderBar;
307+
final Color composeBoxShadow;
300308
final Color contextMenuCancelText;
301309
final Color contextMenuItemBg;
302310
final Color contextMenuItemText;
@@ -350,6 +358,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
350358
Color? btnLabelAttLowIntDanger,
351359
Color? btnLabelAttMediumIntDanger,
352360
Color? composeBoxBg,
361+
Color? composeBoxBorderBar,
362+
Color? composeBoxShadow,
353363
Color? contextMenuCancelText,
354364
Color? contextMenuItemBg,
355365
Color? contextMenuItemText,
@@ -398,6 +408,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
398408
btnLabelAttLowIntDanger: btnLabelAttLowIntDanger ?? this.btnLabelAttLowIntDanger,
399409
btnLabelAttMediumIntDanger: btnLabelAttMediumIntDanger ?? this.btnLabelAttMediumIntDanger,
400410
composeBoxBg: composeBoxBg ?? this.composeBoxBg,
411+
composeBoxBorderBar: composeBoxBorderBar ?? this.composeBoxBorderBar,
412+
composeBoxShadow: composeBoxShadow ?? this.composeBoxShadow,
401413
contextMenuCancelText: contextMenuCancelText ?? this.contextMenuCancelText,
402414
contextMenuItemBg: contextMenuItemBg ?? this.contextMenuItemBg,
403415
contextMenuItemText: contextMenuItemText ?? this.contextMenuItemBg,
@@ -453,6 +465,8 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
453465
btnLabelAttLowIntDanger: Color.lerp(btnLabelAttLowIntDanger, other.btnLabelAttLowIntDanger, t)!,
454466
btnLabelAttMediumIntDanger: Color.lerp(btnLabelAttMediumIntDanger, other.btnLabelAttMediumIntDanger, t)!,
455467
composeBoxBg: Color.lerp(composeBoxBg, other.composeBoxBg, t)!,
468+
composeBoxBorderBar: Color.lerp(composeBoxBorderBar, other.composeBoxBorderBar, t)!,
469+
composeBoxShadow: Color.lerp(composeBoxShadow, other.composeBoxShadow, t)!,
456470
contextMenuCancelText: Color.lerp(contextMenuCancelText, other.contextMenuCancelText, t)!,
457471
contextMenuItemBg: Color.lerp(contextMenuItemBg, other.contextMenuItemBg, t)!,
458472
contextMenuItemText: Color.lerp(contextMenuItemText, other.contextMenuItemBg, t)!,

0 commit comments

Comments
 (0)