@@ -15,12 +15,11 @@ import '../../shared/theme/theme.dart';
1515import '../../shared/widgets/avatar_image.dart' ;
1616import '../../shared/widgets/frosted_app_bar.dart' ;
1717import '../../shared/widgets/frosted_scaffold.dart' ;
18- import '../custom_emoji/custom_emoji.dart' ;
19- import '../custom_emoji/custom_emoji_provider.dart' ;
20- import '../custom_emoji/custom_emoji_render.dart' ;
18+ import '../../shared/ custom_emoji/custom_emoji.dart' ;
19+ import '../../shared/ custom_emoji/custom_emoji_provider.dart' ;
20+ import '../../shared/ custom_emoji/custom_emoji_render.dart' ;
2121import '../profile/profile_avatar.dart' ;
2222import '../profile/profile_provider.dart' ;
23- import '../settings/settings_page.dart' ;
2423import '../profile/presence_cache_provider.dart' ;
2524import '../profile/user_cache_provider.dart' ;
2625import '../pairing/pairing_page.dart' ;
@@ -62,6 +61,19 @@ const double _kChannelLabelGap = Grid.xxs;
6261const double _kChannelRowVerticalPadding = Grid .xxs + Grid .quarter;
6362const double _kChannelLabelInset =
6463 _kChannelSectionInset + _kChannelLeadingWidth + _kChannelLabelGap;
64+
65+ /// DM avatars are circles, so they fill their box edge to edge where a channel
66+ /// glyph leaves 4dp of slack inside the same 22dp leading column. Sizing them to
67+ /// the glyph's ink width keeps the icon-to-label distance identical across both
68+ /// sections while the labels stay on [_kChannelLabelInset] .
69+ const double _kDmAvatarSize = _kChannelIconSize;
70+
71+ /// The top section's avatars are 32dp circles, which fill their box edge to
72+ /// edge; the channel rows below lead with an 18dp glyph left-aligned in a 22dp
73+ /// box at [_kChannelSectionInset] . Edge-aligning the two leaves the circles
74+ /// looking pushed outward, so the bar is pulled in to sit the avatar's centre
75+ /// on the channel-icon column (12 + 16 = 28dp against the glyph's ~29dp).
76+ const double _kTopSectionInset = Grid .twelve;
6577const Duration _kSectionExpandDuration = Duration (milliseconds: 220 );
6678const Duration _kSectionCollapseDuration = Duration (milliseconds: 170 );
6779const Curve _kSectionExpandCurve = Cubic (0.23 , 1 , 0.32 , 1 );
@@ -129,7 +141,9 @@ _UnreadChannelState _computeUnreadChannelState({
129141}
130142
131143class ChannelsPage extends HookConsumerWidget {
132- const ChannelsPage ({super .key});
144+ const ChannelsPage ({required this .settingsPageBuilder, super .key});
145+
146+ final WidgetBuilder settingsPageBuilder;
133147
134148 @override
135149 Widget build (BuildContext context, WidgetRef ref) {
@@ -208,7 +222,11 @@ class ChannelsPage extends HookConsumerWidget {
208222
209223 return FrostedScaffold (
210224 appBar: FrostedAppBar (
211- horizontalInset: _kChannelSectionInset,
225+ horizontalInset: _kTopSectionInset,
226+ // Under a Buzz theme the community + account avatar strip carries the
227+ // branded gradient, the way desktop paints it across the sidebar. Null
228+ // under every other theme, leaving the default frosted fill.
229+ gradient: context.appColors.topSectionGradient,
212230 leading: _CommunityIndicator (
213231 onTap: () => showModalBottomSheet <void >(
214232 context: context,
@@ -219,9 +237,9 @@ class ChannelsPage extends HookConsumerWidget {
219237 title: const SizedBox .shrink (),
220238 actions: [
221239 ProfileAvatar (
222- onTap: () => Navigator .of (context). push (
223- MaterialPageRoute < void >(builder : (_) => const SettingsPage ()) ,
224- ),
240+ onTap: () => Navigator .of (
241+ context ,
242+ ). push ( MaterialPageRoute < void >(builder : settingsPageBuilder)) ,
225243 ),
226244 ],
227245 ),
0 commit comments