From 0380189b24ca45dda5008c59b01cb555dd4b3afb Mon Sep 17 00:00:00 2001 From: immadisairaj Date: Sun, 25 Feb 2024 14:06:33 +0530 Subject: [PATCH] fix: change the unselected chapter color 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. --- lib/src/widgets/stories_list.dart | 36 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/lib/src/widgets/stories_list.dart b/lib/src/widgets/stories_list.dart index dc379d7..ba18efa 100644 --- a/lib/src/widgets/stories_list.dart +++ b/lib/src/widgets/stories_list.dart @@ -153,20 +153,28 @@ class _StoriesListState extends State { 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, + ), ), ), ),