From b974d73107bfcd83daa8b24c90fee85b283eff44 Mon Sep 17 00:00:00 2001 From: sivan22 Date: Tue, 6 Feb 2024 10:16:06 +0200 Subject: [PATCH] small fixing --- TODO.txt | 3 ++- lib/book_tabs_viewer.dart | 50 ++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/TODO.txt b/TODO.txt index 09190ab9e..bf951f96f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,10 +1,11 @@ -up folder in brwser use html2markdown add option for themes for the markdown add search in markdown content add PDF support add search for reference deploy with msix for sharing + +בסקריפט: להוסיף את הרמה האחרונה של כותרת לכל הרמות מעל 4 להחזיר ספרים שנמחקו diff --git a/lib/book_tabs_viewer.dart b/lib/book_tabs_viewer.dart index bfd4aaa79..ab50deabf 100644 --- a/lib/book_tabs_viewer.dart +++ b/lib/book_tabs_viewer.dart @@ -32,7 +32,7 @@ class MarkdownTabViewState extends State with TickerProviderSta void enlargeText() { setState(() { - Settings.setValue( 'key-font-size',min(Settings.getValue('key-font-size')!+5,50.0)); + Settings.setValue( 'key-font-size',min(Settings.getValue('key-font-size')!+3,50.0)); }); @@ -40,7 +40,7 @@ class MarkdownTabViewState extends State with TickerProviderSta void enSmallText() { setState(() { - Settings.setValue( 'key-font-size',max(Settings.getValue('key-font-size')!-5,15.0)); + Settings.setValue( 'key-font-size',max(Settings.getValue('key-font-size')!-3,15.0)); }); @@ -88,7 +88,7 @@ class MarkdownTabViewState extends State with TickerProviderSta bottom: TabBar( controller: tabController, tabs: openedFiles - .map((file) => Tab(text: file.path.split('/').last)) + .map((file) => Tab(text: file.path.split('\\').last)) .toList(), ), ), @@ -98,7 +98,7 @@ class MarkdownTabViewState extends State with TickerProviderSta destinations: const [ NavigationRailDestination( icon: Icon(Icons.library_books), - label: Text('ספריה'), + label: Text('ספריה'), ), NavigationRailDestination( icon: Icon(Icons.search), @@ -213,7 +213,45 @@ class _BookViewerState extends State with AutomaticKeepAliveClientM fontFamily: Settings.getValue('key-font-family'), )), - ]), + H1Config( + style: TextStyle( + fontSize: Settings.getValue('key-font-size')+10, + fontFamily: Settings.getValue('key-font-family'), + fontWeight: FontWeight.bold, + + )), + H2Config( + style: TextStyle( + fontSize: Settings.getValue('key-font-size')+5, + fontFamily: Settings.getValue('key-font-family'), + fontWeight: FontWeight.bold, + + )), + H3Config( + style: TextStyle( + fontSize: Settings.getValue('key-font-size')+5, + fontFamily: Settings.getValue('key-font-family'), + fontWeight: FontWeight.bold, + ) + + ), + H4Config( + style: TextStyle( + fontSize: Settings.getValue('key-font-size'), + fontFamily: Settings.getValue('key-font-family'), + fontWeight: FontWeight.bold, + + ), + ), + H5Config( + style: TextStyle( + fontSize: Settings.getValue('key-font-size')-5, + fontFamily: Settings.getValue('key-font-family'), + fontWeight: FontWeight.bold, + + ), + ), + ]), markdownGenerator: MarkdownGenerator( textGenerator: (node, config, visitor) => CustomTextNode(node.textContent, config, visitor)))); @@ -229,7 +267,7 @@ class _BookViewerState extends State with AutomaticKeepAliveClientM drawer: Drawer(child: buildTocWidget()), appBar: AppBar( actions: [], - title: Text('${widget.file.path.split('/').last}'), + title: Text('${widget.file.path.split('\\').last}'), ), body: buildMarkdown(), );