Skip to content

Commit

Permalink
fix: change timeline tabs to be square
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Dec 10, 2024
1 parent 44d969d commit c716215
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/view/page/timelines_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class TimelinesPage extends HookConsumerWidget {
bottomNavigationBar: showTimelineTabBarAtBottom
? BottomAppBar(
padding: EdgeInsets.zero,
height: 56.0,
height: kToolbarHeight,
color: colors.panel,
elevation: 0.0,
child: Row(
Expand Down
1 change: 1 addition & 0 deletions lib/view/widget/timeline_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class TimelineHeader extends HookConsumerWidget {
},
backgroundColor: Theme.of(context).colorScheme.surface,
collapsedBackgroundColor: Theme.of(context).colorScheme.surface,
visualDensity: VisualDensity.compact,
children: [
if (onlineUsersCount != null)
Text.rich(
Expand Down
8 changes: 4 additions & 4 deletions lib/view/widget/timeline_tab_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import '../../provider/timeline_scroll_controller_provider.dart';
import '../../provider/timeline_tabs_notifier_provider.dart';
import 'tab_icon_widget.dart';

class TimelineTabBar extends HookConsumerWidget implements PreferredSizeWidget {
class TimelineTabBar extends HookConsumerWidget {
const TimelineTabBar({super.key, required this.controller});

final TabController controller;

@override
Widget build(BuildContext context, WidgetRef ref) {
const tabHeight = 46.0;
final tabs = ref.watch(timelineTabsNotifierProvider);

return TabBar(
Expand All @@ -30,6 +31,8 @@ class TimelineTabBar extends HookConsumerWidget implements PreferredSizeWidget {
indicator: BoxDecoration(
color: Theme.of(context).colorScheme.primary.withOpacity(0.5),
),
labelPadding:
const EdgeInsets.symmetric(horizontal: (tabHeight - 24.0) / 2),
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 0.0,
dividerHeight: 0.0,
Expand All @@ -56,7 +59,4 @@ class TimelineTabBar extends HookConsumerWidget implements PreferredSizeWidget {
tabAlignment: TabAlignment.center,
);
}

@override
Size get preferredSize => const Size.fromHeight(46.0);
}

0 comments on commit c716215

Please sign in to comment.