Ignore:
Timestamp:
2017-11-19T20:12:24+01:00 (17 months ago)
Author:
Don-vip
Message:

fix #15572 - use ImageProvider attach API for all JOSM actions to ensure proper icon size everywhere

Location:
trunk/src/org/openstreetmap/josm/gui/io
Files:
4 edited

Legend:

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

    r12846 r13130  
    295295        RefreshAction() {
    296296            putValue(SHORT_DESCRIPTION, tr("Load the list of your open changesets from the server"));
    297             putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));
     297            new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true);
    298298        }
    299299
     
    310310    class CloseChangesetAction extends AbstractAction implements ItemListener {
    311311        CloseChangesetAction() {
    312             putValue(SMALL_ICON, ImageProvider.get("closechangeset"));
     312            new ImageProvider("closechangeset").getResource().attachImageIcon(this, true);
    313313            putValue(SHORT_DESCRIPTION, tr("Close the currently selected open changeset"));
    314314            refreshEnabledState();
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java

    r12678 r13130  
    116116        CloseAction() {
    117117            putValue(NAME, tr("Close changesets"));
    118             putValue(SMALL_ICON, ImageProvider.get("closechangeset"));
     118            new ImageProvider("closechangeset").getResource().attachImageIcon(this, true);
    119119            putValue(SHORT_DESCRIPTION, tr("Close the selected open changesets"));
    120120            refreshEnabledState();
     
    142142        CancelAction() {
    143143            putValue(NAME, tr("Cancel"));
    144             putValue(SMALL_ICON, ImageProvider.get("cancel"));
     144            new ImageProvider("cancel").getResource().attachImageIcon(this, true);
    145145            putValue(SHORT_DESCRIPTION, tr("Cancel closing of changesets"));
    146146        }
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r13069 r13130  
    364364            putValue(NAME, tr("Cancel"));
    365365            putValue(SHORT_DESCRIPTION, tr("Close this dialog and resume editing in JOSM"));
    366             putValue(SMALL_ICON, ImageProvider.get("cancel"));
     366            new ImageProvider("cancel").getResource().attachImageIcon(this, true);
    367367            InputMapUtils.addEscapeAction(getRootPane(), this);
    368368        }
     
    398398                    putValue(NAME, tr("Exit now!"));
    399399                    putValue(SHORT_DESCRIPTION, tr("Exit JOSM without saving. Unsaved changes are lost."));
    400                     putValue(SMALL_ICON, ImageProvider.get("exit"));
     400                    new ImageProvider("exit").getResource().attachImageIcon(this, true);
    401401                    break;
    402402                case RESTART:
    403403                    putValue(NAME, tr("Restart now!"));
    404404                    putValue(SHORT_DESCRIPTION, tr("Restart JOSM without saving. Unsaved changes are lost."));
    405                     putValue(SMALL_ICON, ImageProvider.get("restart"));
     405                    new ImageProvider("restart").getResource().attachImageIcon(this, true);
    406406                    break;
    407407                case DELETE:
    408408                    putValue(NAME, tr("Delete now!"));
    409409                    putValue(SHORT_DESCRIPTION, tr("Delete layers without saving. Unsaved changes are lost."));
    410                     putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
     410                    new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true);
    411411                    break;
    412412            }
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r12881 r13130  
    4343import org.openstreetmap.josm.Main;
    4444import org.openstreetmap.josm.data.APIDataSet;
    45 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    46 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    4745import org.openstreetmap.josm.data.Version;
    4846import org.openstreetmap.josm.data.osm.Changeset;
    4947import org.openstreetmap.josm.data.osm.DataSet;
    5048import org.openstreetmap.josm.data.osm.OsmPrimitive;
    51 import org.openstreetmap.josm.spi.preferences.Setting;
    5249import org.openstreetmap.josm.gui.ExtendedDialog;
    5350import org.openstreetmap.josm.gui.HelpAwareOptionPane;
     
    6158import org.openstreetmap.josm.io.UploadStrategySpecification;
    6259import org.openstreetmap.josm.spi.preferences.Config;
     60import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
     61import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
     62import org.openstreetmap.josm.spi.preferences.Setting;
    6363import org.openstreetmap.josm.tools.GBC;
    6464import org.openstreetmap.josm.tools.ImageOverlay;
     
    433433            this.dialog = dialog;
    434434            putValue(NAME, tr("Upload Changes"));
    435             putValue(SMALL_ICON, ImageProvider.get("upload"));
     435            new ImageProvider("upload").getResource().attachImageIcon(this, true);
    436436            putValue(SHORT_DESCRIPTION, tr("Upload the changed primitives"));
    437437        }
     
    588588            this.dialog = dialog;
    589589            putValue(NAME, tr("Cancel"));
    590             putValue(SMALL_ICON, ImageProvider.get("cancel"));
     590            new ImageProvider("cancel").getResource().attachImageIcon(this, true);
    591591            putValue(SHORT_DESCRIPTION, tr("Cancel the upload and resume editing"));
    592592        }
Note: See TracChangeset for help on using the changeset viewer.