Fix breaks (<hr>) CSS style, GUI update bug fixed
authorNiki Roo <niki@nikiroo.be>
Thu, 23 Feb 2017 13:15:26 +0000 (14:15 +0100)
committerNiki Roo <niki@nikiroo.be>
Thu, 23 Feb 2017 13:15:26 +0000 (14:15 +0100)
src/be/nikiroo/fanfix/output/Epub.java
src/be/nikiroo/fanfix/output/Html.java
src/be/nikiroo/fanfix/output/epub.style.css
src/be/nikiroo/fanfix/output/html.style.css
src/be/nikiroo/fanfix/reader/LocalReaderBook.java

index de55d4c7e15b63e7ade7b0ea58b19071b87e088c..89bff66274ee3057125cbfa93169fed836869ee2 100644 (file)
@@ -198,7 +198,7 @@ class Epub extends BasicOutput {
                        writer.write("          <div class='blank'></div>");
                        break;
                case BREAK:
-                       writer.write("          <hr/>");
+                       writer.write("          <hr class='break'/>");
                        break;
                case NORMAL:
                        writer.write("          <span class='normal'>");
index e11ebcf426c152bfb349b323ab7469b1db8bd6a1..a02124cc53235dc6aae38e4e24083de16382ee5b 100644 (file)
@@ -206,7 +206,7 @@ class Html extends BasicOutput {
                        writer.write("          <div class='blank'></div>");
                        break;
                case BREAK:
-                       writer.write("          <hr/>");
+                       writer.write("          <hr class='break'/>");
                        break;
                case NORMAL:
                        writer.write("          <span class='normal'>");
index 4bdab3928a69f89898996cb401d2247badc4cf0b..2c4a961b5052d4a79aea66a6950cbfbc318730fa 100644 (file)
@@ -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 {
 }
 
index 2f88f0c5a938e398dd29ec60de5ae2d5c0d7b4c5..6b6d0d20226c932d7f621ed8324d6f07884c45a9 100644 (file)
@@ -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
+}
index 7dd41b6ca304a9ef586360d5f452c8062b4fd211..3b29e7f59f6249c6d4cbb14ce83e0c2c24d755f9 100644 (file)
@@ -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();
+               }
        }
 
        /**