From f977d05b0516f4dcc1978d113ee8e945ab3fb2f9 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Thu, 23 Feb 2017 14:15:26 +0100 Subject: [PATCH] Fix breaks (
) CSS style, GUI update bug fixed --- src/be/nikiroo/fanfix/output/Epub.java | 2 +- src/be/nikiroo/fanfix/output/Html.java | 2 +- src/be/nikiroo/fanfix/output/epub.style.css | 6 ++++++ src/be/nikiroo/fanfix/output/html.style.css | 8 +++++++- src/be/nikiroo/fanfix/reader/LocalReaderBook.java | 5 ++++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/be/nikiroo/fanfix/output/Epub.java b/src/be/nikiroo/fanfix/output/Epub.java index de55d4c7..89bff662 100644 --- a/src/be/nikiroo/fanfix/output/Epub.java +++ b/src/be/nikiroo/fanfix/output/Epub.java @@ -198,7 +198,7 @@ class Epub extends BasicOutput { writer.write("
"); break; case BREAK: - writer.write("
"); + writer.write("
"); break; case NORMAL: writer.write(" "); diff --git a/src/be/nikiroo/fanfix/output/Html.java b/src/be/nikiroo/fanfix/output/Html.java index e11ebcf4..a02124cc 100644 --- a/src/be/nikiroo/fanfix/output/Html.java +++ b/src/be/nikiroo/fanfix/output/Html.java @@ -206,7 +206,7 @@ class Html extends BasicOutput { writer.write("
"); break; case BREAK: - writer.write("
"); + writer.write("
"); break; case NORMAL: writer.write(" "); diff --git a/src/be/nikiroo/fanfix/output/epub.style.css b/src/be/nikiroo/fanfix/output/epub.style.css index 4bdab392..2c4a961b 100644 --- a/src/be/nikiroo/fanfix/output/epub.style.css +++ b/src/be/nikiroo/fanfix/output/epub.style.css @@ -96,6 +96,12 @@ h2 .chaptitle { width: 100%; } +hr.break { + /* Can be removed if you want a more "compact" view */ + margin-top: 48px; + margin-bottom: 48px; +} + .dialogues { } diff --git a/src/be/nikiroo/fanfix/output/html.style.css b/src/be/nikiroo/fanfix/output/html.style.css index 2f88f0c5..6b6d0d20 100644 --- a/src/be/nikiroo/fanfix/output/html.style.css +++ b/src/be/nikiroo/fanfix/output/html.style.css @@ -98,9 +98,15 @@ h2 .chaptitle { width: 100%; } +hr.break { + /* Can be removed if you want a more "compact" view */ + margin-top: 48px; + margin-bottom: 48px; +} + .dialogues { } .dialogue { font-style: italic; -} \ No newline at end of file +} diff --git a/src/be/nikiroo/fanfix/reader/LocalReaderBook.java b/src/be/nikiroo/fanfix/reader/LocalReaderBook.java index 7dd41b6c..3b29e7f5 100644 --- a/src/be/nikiroo/fanfix/reader/LocalReaderBook.java +++ b/src/be/nikiroo/fanfix/reader/LocalReaderBook.java @@ -266,7 +266,10 @@ class LocalReaderBook extends JPanel { * TRUE if it is present in the {@link LocalReader} cache */ public void setCached(boolean cached) { - this.cached = cached; + if (this.cached != cached) { + this.cached = cached; + invalidate(); + } } /** -- 2.27.0