Skip to content

Commit

Permalink
ListTiles: reduce visual density (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Feb 17, 2022
1 parent 4833c78 commit 591f480
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/yaru_page_item_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class YaruPageItemListView extends StatelessWidget {
_calcScrollbarThicknessWithTrack(context);

return ListView.separated(
separatorBuilder: (_, __) => const SizedBox(height: 8.0),
separatorBuilder: (_, __) => const SizedBox(height: 6.0),
padding: !materialTiles
? EdgeInsets.symmetric(
horizontal: scrollbarThicknessWithTrack,
Expand All @@ -35,6 +35,8 @@ class YaruPageItemListView extends StatelessWidget {
itemCount: pages.length,
itemBuilder: (context, index) => materialTiles
? ListTile(
visualDensity:
const VisualDensity(horizontal: -4, vertical: -4),
selected: index == selectedIndex,
title: Text(pages[index].title),
leading: Icon(pages[index].iconData),
Expand Down Expand Up @@ -87,6 +89,7 @@ class _YaruListTile extends StatelessWidget {
: null,
),
child: ListTile(
visualDensity: const VisualDensity(horizontal: -4, vertical: -4),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(4.0)),
),
Expand Down

0 comments on commit 591f480

Please sign in to comment.