Ticket #20360: JOSM-splash-wrap-fix.diff
File JOSM-splash-wrap-fix.diff, 1.7 KB (added by , 7 weeks ago) |
---|
-
src/org/openstreetmap/josm/gui/SplashScreen.java
384 384 385 385 private static class SplashScreenProgressRenderer extends JPanel { 386 386 private final JosmEditorPane lblTaskTitle = new JosmEditorPane(); 387 private final JScrollPane scrollPane = new JScrollPane(lblTaskTitle, 388 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); 387 389 private final JProgressBar progressBar = new JProgressBar(JProgressBar.HORIZONTAL); 388 390 private static final String LABEL_HTML = "<html>" 389 391 + "<style>ul {margin-top: 0; margin-bottom: 0; padding: 0;} li {margin: 0; padding: 0;}</style>"; … … 393 395 394 396 JosmEditorPane.makeJLabelLike(lblTaskTitle, false); 395 397 lblTaskTitle.setText(LABEL_HTML); 396 final JScrollPane scrollPane = new JScrollPane(lblTaskTitle,397 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);398 398 scrollPane.setPreferredSize(new Dimension(0, 320)); 399 399 scrollPane.setBorder(BorderFactory.createEmptyBorder()); 400 400 add(scrollPane, GBC.eol().insets(5, 5, 0, 0).fill(GridBagConstraints.HORIZONTAL)); … … 417 417 public void setTasks(String tasks) { 418 418 lblTaskTitle.setText(LABEL_HTML + tasks); 419 419 lblTaskTitle.setCaretPosition(lblTaskTitle.getDocument().getLength()); 420 scrollPane.getHorizontalScrollBar().setValue(0); 420 421 } 421 422 } 422 423 }