Changeset 17449 in josm for trunk/src


Ignore:
Timestamp:
2021-01-09T16:54:30+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #20360 - fix splash screen scrolling (patch by DevCharly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r16069 r17449  
    385385    private static class SplashScreenProgressRenderer extends JPanel {
    386386        private final JosmEditorPane lblTaskTitle = new JosmEditorPane();
     387        private final JScrollPane scrollPane = new JScrollPane(lblTaskTitle,
     388                ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    387389        private final JProgressBar progressBar = new JProgressBar(JProgressBar.HORIZONTAL);
    388390        private static final String LABEL_HTML = "<html>"
     
    394396            JosmEditorPane.makeJLabelLike(lblTaskTitle, false);
    395397            lblTaskTitle.setText(LABEL_HTML);
    396             final JScrollPane scrollPane = new JScrollPane(lblTaskTitle,
    397                     ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    398398            scrollPane.setPreferredSize(new Dimension(0, 320));
    399399            scrollPane.setBorder(BorderFactory.createEmptyBorder());
     
    418418            lblTaskTitle.setText(LABEL_HTML + tasks);
    419419            lblTaskTitle.setCaretPosition(lblTaskTitle.getDocument().getLength());
     420            scrollPane.getHorizontalScrollBar().setValue(0);
    420421        }
    421422    }
Note: See TracChangeset for help on using the changeset viewer.