Skip to content

Commit

Permalink
fix: change the unselected chapter color (#113)
Browse files Browse the repository at this point in the history
The selected and unselected chapter has only difference of font weight.
So, this commit changes the unselected color to a lighter variant.

Also, this commit adds the mouse cursor to click on hover of the
chapters telling that it is clickable.

Co-authored-by: Lukas Klingsbo <[email protected]>
  • Loading branch information
immadisairaj and spydon authored Mar 11, 2024
1 parent a1b034a commit 641861c
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions lib/src/widgets/stories_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,28 @@ class _StoriesListState extends State<StoriesList> {
child: Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
widget.onSelectChapter(chapter);
},
behavior: HitTestBehavior.opaque,
child: Link(
label: ' ${chapter.name}',
textAlign: TextAlign.left,
padding: const EdgeInsets.only(right: 8),
textStyle: TextStyle(
fontWeight: chapter.id ==
widget.selectedChapter?.id
? FontWeight.bold
: FontWeight.normal,
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
widget.onSelectChapter(chapter);
},
behavior: HitTestBehavior.opaque,
child: Link(
label: ' ${chapter.name}',
textAlign: TextAlign.left,
padding:
const EdgeInsets.only(right: 8),
textStyle: TextStyle(
fontWeight: chapter.id ==
widget.selectedChapter?.id
? FontWeight.bold
: FontWeight.normal,
color: chapter.id ==
widget.selectedChapter?.id
? null
: Theme.of(context).hintColor,
),
),
),
),
Expand Down

0 comments on commit 641861c

Please sign in to comment.