Skip to content

Commit

Permalink
Add padding top and adjust font-size
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupi007 committed Oct 6, 2022
1 parent 4371185 commit 26f842b
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions lib/src/pages/layouts/yaru_navigation_rail.dart
Expand Up @@ -20,18 +20,21 @@ class YaruNavigationRail extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
for (int i = 0; i < destinations.length; i += 1)
_YaruNavigationRailItem(
i,
i == selectedIndex,
destinations[i],
onDestinationSelected,
showLabels,
showLabels && extended,
)
],
return Padding(
padding: const EdgeInsets.symmetric(vertical: 5),
child: Column(
children: <Widget>[
for (int i = 0; i < destinations.length; i += 1)
_YaruNavigationRailItem(
i,
i == selectedIndex,
destinations[i],
onDestinationSelected,
showLabels,
showLabels && extended,
)
],
),
);
}
}
Expand Down Expand Up @@ -67,7 +70,7 @@ class _YaruNavigationRailItem extends StatelessWidget {
child: Center(
child: Padding(
padding: EdgeInsets.symmetric(
vertical: extended ? 10 : 8,
vertical: extended ? 10 : 5,
horizontal: extended ? 8 : 5,
),
child: _columnOrRow([
Expand Down Expand Up @@ -131,8 +134,8 @@ class _YaruNavigationRailItem extends StatelessWidget {
if (label is YaruPageItemTitle) {
label = DefaultTextStyle.merge(
child: label,
style: const TextStyle(
fontSize: 13,
style: TextStyle(
fontSize: extended ? 13 : 12,
fontWeight: FontWeight.w500,
),
overflow: TextOverflow.ellipsis,
Expand Down

0 comments on commit 26f842b

Please sign in to comment.