Skip to content

Commit

Permalink
small fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sivan22 committed Feb 6, 2024
1 parent cb1e679 commit b974d73
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
3 changes: 2 additions & 1 deletion TODO.txt
Original file line number Diff line number Diff line change
@@ -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
להחזיר ספרים שנמחקו

50 changes: 44 additions & 6 deletions lib/book_tabs_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class MarkdownTabViewState extends State<MarkdownTabView> with TickerProviderSta

void enlargeText() {
setState(() {
Settings.setValue<double>( 'key-font-size',min(Settings.getValue<double>('key-font-size')!+5,50.0));
Settings.setValue<double>( 'key-font-size',min(Settings.getValue<double>('key-font-size')!+3,50.0));

});

}

void enSmallText() {
setState(() {
Settings.setValue<double>( 'key-font-size',max(Settings.getValue<double>('key-font-size')!-5,15.0));
Settings.setValue<double>( 'key-font-size',max(Settings.getValue<double>('key-font-size')!-3,15.0));

});

Expand Down Expand Up @@ -88,7 +88,7 @@ class MarkdownTabViewState extends State<MarkdownTabView> 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(),
),
),
Expand All @@ -98,7 +98,7 @@ class MarkdownTabViewState extends State<MarkdownTabView> with TickerProviderSta
destinations: const [
NavigationRailDestination(
icon: Icon(Icons.library_books),
label: Text('ספריה'),
label: Text('ספריה'),
),
NavigationRailDestination(
icon: Icon(Icons.search),
Expand Down Expand Up @@ -213,7 +213,45 @@ class _BookViewerState extends State<BookViewer> 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))));
Expand All @@ -229,7 +267,7 @@ class _BookViewerState extends State<BookViewer> 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(),
);
Expand Down

0 comments on commit b974d73

Please sign in to comment.