Fix breaks (<hr>) CSS style, GUI update bug fixed
[fanfix.git] / src / be / nikiroo / fanfix / reader / LocalReaderBook.java
index 2c6d28bd3161601a554db218298fc0e2c9332a8a..3b29e7f59f6249c6d4cbb14ce83e0c2c24d755f9 100644 (file)
@@ -20,6 +20,7 @@ import javax.swing.JPanel;
 
 import be.nikiroo.fanfix.data.MetaData;
 import be.nikiroo.fanfix.data.Story;
+import be.nikiroo.utils.ui.UIUtils;
 
 /**
  * A book item presented in a {@link LocalReaderFrame}.
@@ -265,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();
+               }
        }
 
        /**
@@ -324,8 +328,8 @@ class LocalReaderBook extends JPanel {
                g.fillRect(clip.x, clip.y, clip.width, clip.height);
 
                if (cached) {
-                       g.setColor(Color.green);
-                       g.fillOval(COVER_WIDTH + HOFFSET + 30, 10, 20, 20);
+                       UIUtils.drawEllipse3D(g, Color.green.darker(), COVER_WIDTH
+                                       + HOFFSET + 30, 10, 20, 20);
                }
        }
 }