From: Niki Roo Date: Sun, 24 Mar 2019 17:37:45 +0000 (+0100) Subject: ui: image viewer fix size first image X-Git-Tag: fanfix-2.0.0~2 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=eea1c0a848465b54feb2648f426196e6ffb7a24f;p=fanfix.git ui: image viewer fix size first image --- diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderViewerPanel.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderViewerPanel.java index 18f6aca..12d6be6 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderViewerPanel.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderViewerPanel.java @@ -201,6 +201,10 @@ public class GuiReaderViewerPanel extends JPanel { final Image img = chap.getParagraphs().get(i).getContentImage(); + // prepare the viewport to get the right sizes later on + image.setIcon(null); + scroll.setViewportView(image); + new Thread(new Runnable() { @Override public void run() {