Changeset 30806 in osm for applications/editors
- Timestamp:
- 2014-11-18T23:03:38+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/OpenPreferencesActions.java
r30723 r30806 5 5 6 6 import java.awt.event.ActionEvent; 7 import java.awt.event.KeyEvent; 7 8 8 9 import org.openstreetmap.josm.Main; … … 11 12 import org.openstreetmap.josm.plugins.opendata.core.OdConstants; 12 13 import org.openstreetmap.josm.plugins.opendata.core.gui.OdPreferenceSetting; 13 import org.openstreetmap.josm.tools. ImageProvider;14 import org.openstreetmap.josm.tools.Shortcut; 14 15 15 16 public class OpenPreferencesActions extends JosmAction { 16 17 17 18 public OpenPreferencesActions() { 18 super(false); 19 putValue(NAME, tr("OpenData preferences")); 20 putValue(SMALL_ICON, ImageProvider.get("dialogs", OdConstants.ICON_CORE_24)); 21 putValue("toolbar", "opendata_open_preferences"); 19 super(tr("OpenData preferences"), OdConstants.ICON_CORE_24, null, 20 Shortcut.registerShortcut("opendata_open_preferences", tr("OpenData preferences"), 21 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true, false); 22 22 } 23 23 -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleInformation.java
r30795 r30806 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Dimension; 6 7 import java.awt.Image; 7 8 import java.io.File; … … 28 29 import org.openstreetmap.josm.plugins.opendata.core.util.OdUtils; 29 30 import org.openstreetmap.josm.tools.ImageProvider; 31 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 30 32 import org.openstreetmap.josm.tools.LanguageInfo; 31 33 … … 328 330 329 331 public ImageIcon getScaledIcon() { 330 if (icon == null)331 returnOdUtils.getImageIcon(OdConstants.ICON_EMPTY_24);332 return new ImageIcon(icon .getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH));332 Dimension dim = ImageProvider.getImageSizes(ImageSizes.MENU); 333 ImageIcon iconToScale = icon != null ? icon : OdUtils.getImageIcon(OdConstants.ICON_EMPTY_24); 334 return new ImageIcon(iconToScale.getImage().getScaledInstance(dim.width, dim.height, Image.SCALE_SMOOTH)); 333 335 } 334 336 }
Note:
See TracChangeset
for help on using the changeset viewer.