Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

[Reply] Cap body at 1340 for desktop and tablet #425

Merged
merged 8 commits into from
Feb 18, 2021
21 changes: 16 additions & 5 deletions lib/studies/reply/adaptive_nav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,23 @@ class _DesktopNavState extends State<_DesktopNav>
);
},
),
const VerticalDivider(thickness: 1, width: 1),
const VerticalDivider(thickness: 1, width: 2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reason for this change?

Copy link
Contributor Author

@Renzo-Olivares Renzo-Olivares Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

white_lines

I increased the width to remedy some artifacts (white vertical lines surrounding body shown above). From my observation, they seem to be a result of the navigation rail body not expanding to its max-width like it previously did before this change.

Copy link
Contributor Author

@Renzo-Olivares Renzo-Olivares Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these lines still show up if I don't have my browser window maximized. It looks like they show up right when I stretch the body past the 1340 width cap. Maybe because the Expanded widget is no longer taking up the entire available space, so there is a gap. I'll keep working on this.

Expanded(
child: _SharedAxisTransitionSwitcher(
defaultChild: _MailNavigator(
child: MailboxBody(key: widget.inboxKey),
),
child: Row(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should be able to achieve this without using a Row. Perhaps replace the Row and Flexible widgets with a Center widget?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion that works!

mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: ConstrainedBox(
constraints:
BoxConstraints(maxWidth: widget.extended ? 1340 : 800),
child: _SharedAxisTransitionSwitcher(
defaultChild: _MailNavigator(
child: MailboxBody(key: widget.inboxKey),
),
),
),
),
],
),
),
],
Expand Down