Skip to content

Commit 0c0fcb6

Browse files
committed
theme: Apply icon color through IconButtonTheme
The most conspicuous change this makes is to the "back" icon in an AppBar, aka AppBar.leading. Those have been a white or black color from Material defaults; now they get our "icon" color. This matches what's in Figma; and also matches the action icons, for any app bars that have both. Currently our only app bar with an action is also the only one that lacks a "leading": it's on ChooseAccountPage, which is at the root of navigation so there's nowhere for a "back" icon to lead to. But when we add actions in other pages, the mismatch would become conspicuous. This change also turns a handful of less-visible icon buttons from white/black to the icon color: the lightbox's "copy link" or play/pause buttons, and the show/hide-password button on the username/password login page. I think those changes are desirable too. All our other icon buttons that I can find already (either in the source, or by browsing around the app) have a color specified, and aren't affected by this change.
1 parent 112c244 commit 0c0fcb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/widgets/theme.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ ThemeData zulipThemeData(BuildContext context) {
3636
brightness: brightness,
3737
typography: zulipTypography(context),
3838
extensions: themeExtensions,
39+
iconButtonTheme: IconButtonThemeData(style: IconButton.styleFrom(
40+
foregroundColor: designVariables.icon,
41+
)),
3942
appBarTheme: AppBarTheme(
4043
// Set these two fields to prevent a color change in [AppBar]s when
4144
// there is something scrolled under it. If an app bar hasn't been
@@ -45,10 +48,7 @@ ThemeData zulipThemeData(BuildContext context) {
4548
scrolledUnderElevation: 0,
4649
backgroundColor: designVariables.bgTopBar,
4750

48-
// TODO match layout to Figma
49-
actionsIconTheme: IconThemeData(
50-
color: designVariables.icon,
51-
),
51+
// TODO match actions layout to Figma
5252

5353
titleTextStyle: TextStyle(
5454
inherit: false,

0 commit comments

Comments
 (0)