Changeset 8499 in josm


Ignore:
Timestamp:
2015-06-19T22:28:05+02:00 (9 years ago)
Author:
simon04
Message:

see #11355 - Splash screen: attempt to fix dialog height issue

File:
1 edited

Legend:

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

    r8497 r8499  
    118118    @Override
    119119    public void stateChanged(ChangeEvent ignore) {
    120         progressRenderer.setTasks("<html>"
    121                 + "<style>ul {margin-top: 0; margin-bottom: 0; padding: 0;} li {margin: 0; padding: 0;}</style>"
    122                 + "<body height='320'>"
    123                 + progressMonitor.toString());
     120        progressRenderer.setTasks(progressMonitor.toString());
     121        pack();
    124122    }
    125123
     
    330328        private JLabel lblTaskTitle;
    331329        private JProgressBar progressBar;
     330        private static final String labelHtml = "<html>"
     331                + "<style>ul {margin-top: 0; margin-bottom: 0; padding: 0;} li {margin: 0; padding: 0;}</style>"
     332                + "<body height='320'>";
    332333
    333334        protected void build() {
     
    340341            gc.weighty = 0.0;
    341342            gc.insets = new Insets(5,0,0,0);
    342             add(lblTaskTitle = new JLabel(" "), gc);
     343            add(lblTaskTitle = new JLabel(labelHtml), gc);
    343344
    344345            gc.gridy = 1;
     
    362363
    363364        public void setTasks(String tasks) {
    364             lblTaskTitle.setText(tasks);
     365            lblTaskTitle.setText(labelHtml + tasks);
    365366            repaint();
    366367        }
Note: See TracChangeset for help on using the changeset viewer.